Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Cumulative Sales by Region | Introduction to Window Functions
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Window Functions in SQL

bookChallenge: Cumulative Sales by Region

Compito

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, and amount from the sales table.
  • Calculate a cumulative sum of the amount column for each region, ordered by sale_date and then by sale_id.
  • Name the cumulative sum column cumulative_sales.
  • Partition the calculation by region.
  • Order the final results by region, then by sale_date, and then by sale_id.

Soluzione

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 7
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

close

bookChallenge: Cumulative Sales by Region

Scorri per mostrare il menu

Compito

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, and amount from the sales table.
  • Calculate a cumulative sum of the amount column for each region, ordered by sale_date and then by sale_id.
  • Name the cumulative sum column cumulative_sales.
  • Partition the calculation by region.
  • Order the final results by region, then by sale_date, and then by sale_id.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 7
single

single

some-alt