Jump to content

Reports: multiple COUNT and multiple GROUP BY?


mojahidm

Recommended Posts

Hi,

Do you know if it is possible to have multiple counts and multiple group by in reports?

The SQL I have is:

select h_fk_servicename, count(h_fk_servicename) as 'No. of Service', h_catalog, count(h_catalog) as 'No. of Catalog', h_category, count(h_category) as 'No. of Request Category'
from h_itsm_requests
where h_datelogged between '18-07-01' and '18-10-03'
and h_fk_team_name = 'Servicedesk UK'
and h_container_id = 68
group by h_fk_servicename, h_catalog, h_category
order by count(h_category) desc

image.thumb.png.b3b057a8c77fac3d25d1872be9a21cbf.png

and I'm trying to get it to run as a report, but you only seem to be able to choose one column to count and Group By:

image.thumb.png.703773783766c4bd070286748408c862.png

Mojahid

Side Note: Working on a report that will let me see the Top 10 Request Categories, showing me the ServiceName, CatalogName and RequestCategory

 

Link to comment
Share on other sites

  • 1 month later...
  • Victor changed the title to Reports: multiple COUNT and multiple GROUP BY?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...