Help please, I am new to sql and i am working on a dataset.
I want to compare the ticket volumes created on a every weekends vs the volume of ticket on every weekdays. I am using a 2023 dataset from January to December.
SELECT
DATENAME(DW, Created_time)AS Daily_Volume, COUNT(DISTINCT Ticket_ID) AS Total_Request
FROM [SLA DB].[dbo].[data_challenge]
GROUP BY DATENAME(DW, Created_time)
I used this quarries and it returned the cumulative volumes for everyweek of the year. I am not sure i have done the right thing. I think in comparisosn i should have a column for weekday that shows all volumes and a column for weekend that shows all volumes for weekend. How do i create separate columns that captures all data for weekday and weekend from my dataset
SELECT
DATENAME(DW, Created_time)AS Daily_Volume, COUNT(DISTINCT Ticket_ID) AS Total_Request
FROM [SLA DB].[dbo].[data_challenge]
GROUP BY DATENAME(DW, Created_time)
compare different columns that shows all weekend and all weekdays volumes
Bashiru Otokiti is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.