troubleshooting Question

Find all sectors represented per each Unique Agency on a table

Avatar of al4629740
al4629740Flag for United States of America asked on
SQL
6 Comments1 Solution74 ViewsLast Modified:
I need help fast.  I need an SQL query for the following request

In the attached table I highlighted specific columns that represent sectors.  I need to know for each Unique Agency, How many of these sectors are represented.  For example, if the agency "Albany Park" has at least one row with the sector Police then that counts as one sector represented for the time period.  I need to know for each of these Agencies which sectors were at least represented at some point or basically the ones that have a "1" in it.

Please help
tblOrgHours.xlsx
ASKER CERTIFIED SOLUTION
Russell Fox
Data Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Top Expert 2014

The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros