Challenge: Cumulative Sales by Region
Tâche
Swipe to start coding
Write a query to calculate the cumulative sales amount for each region, ordered by sale_date.
- Select the columns
sale_id,sale_date,employee_id,region, andamountfrom thesalestable. - Calculate a cumulative sum of the
amountcolumn for eachregion, ordered bysale_dateand then bysale_id. - Name the cumulative sum column
cumulative_sales. - Partition the calculation by
region. - Order the final results by
region, then bysale_date, and then bysale_id.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 7
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Génial!
Completion taux amélioré à 4.55
Challenge: Cumulative Sales by Region
Glissez pour afficher le menu
Tâche
Swipe to start coding
Write a query to calculate the cumulative sales amount for each region, ordered by sale_date.
- Select the columns
sale_id,sale_date,employee_id,region, andamountfrom thesalestable. - Calculate a cumulative sum of the
amountcolumn for eachregion, ordered bysale_dateand then bysale_id. - Name the cumulative sum column
cumulative_sales. - Partition the calculation by
region. - Order the final results by
region, then bysale_date, and then bysale_id.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 7
single