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 these queries and it returned the cumulative volumes for every week of the year. I am not sure i have done the right thing. I think in comparison 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.