Challenge: Aggregate Monthly Sales
Task
Swipe to start coding
Write a SQL query to calculate the total sales amount for each month using the transactions table. The query should group results by month and only include transactions where the category is 'Sales'.
- Use the
transactionstable. - Group the results by month using the
transaction_datecolumn. - Only include rows where
categoryis'Sales'. - Calculate the total sales amount for each month.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 4.55
Challenge: Aggregate Monthly Sales
Swipe to show menu
Task
Swipe to start coding
Write a SQL query to calculate the total sales amount for each month using the transactions table. The query should group results by month and only include transactions where the category is 'Sales'.
- Use the
transactionstable. - Group the results by month using the
transaction_datecolumn. - Only include rows where
categoryis'Sales'. - Calculate the total sales amount for each month.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 2
single