Challenge: Segment Sales Data
Tâche
Swipe to start coding
Write two SQL queries using the existing sales table to analyze sales performance by product and by customer.
- The first query must return each
product_idalong with the total sales amount for that product. UseSUM(total_amount)and group byproduct_id. - The second query must return each
customer_idalong with the number of orders placed by that customer. UseCOUNT(sale_id)and group bycustomer_id.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 4
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é à 5.56
Challenge: Segment Sales Data
Glissez pour afficher le menu
Tâche
Swipe to start coding
Write two SQL queries using the existing sales table to analyze sales performance by product and by customer.
- The first query must return each
product_idalong with the total sales amount for that product. UseSUM(total_amount)and group byproduct_id. - The second query must return each
customer_idalong with the number of orders placed by that customer. UseCOUNT(sale_id)and group bycustomer_id.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 4
single