Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Analyze Trends with Window Functions | Window Functions for Trends and Rankings
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
SQL for Business Intelligence Analysts

bookChallenge: Analyze Trends with Window Functions

Task

Swipe to start coding

Write SQL queries using window functions to analyze trends in the provided sales and employee performance data.

  • Calculate the running total of sales amount by sale date.
  • Calculate the 3-day moving average of sales amount by sale date.
  • For each employee, calculate their running total of sales amount over time.
  • For each employee, calculate a 2-period moving average of their sales achieved from performance reviews.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 2
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

bookChallenge: Analyze Trends with Window Functions

Swipe to show menu

Task

Swipe to start coding

Write SQL queries using window functions to analyze trends in the provided sales and employee performance data.

  • Calculate the running total of sales amount by sale date.
  • Calculate the 3-day moving average of sales amount by sale date.
  • For each employee, calculate their running total of sales amount over time.
  • For each employee, calculate a 2-period moving average of their sales achieved from performance reviews.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 2
single

single

some-alt