Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Compare Performance Over Time | Ranking and Analytic Window Functions
Window Functions in SQL

bookChallenge: Compare Performance Over Time

Tarefa

Swipe to start coding

Write a query to display each employee's performance score for every review and show the difference in score compared to their previous review.

  • Select employee_id, name, review_date, and score for each performance review.
  • Use the LAG window function to access the previous review's score for the same employee, ordered by review_date.
  • Calculate the difference between the current score and the previous score for each review.
  • Name the difference column score_difference.
  • Ensure results are ordered by employee_id and review_date.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 6
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Compare Performance Over Time

Deslize para mostrar o menu

Tarefa

Swipe to start coding

Write a query to display each employee's performance score for every review and show the difference in score compared to their previous review.

  • Select employee_id, name, review_date, and score for each performance review.
  • Use the LAG window function to access the previous review's score for the same employee, ordered by review_date.
  • Calculate the difference between the current score and the previous score for each review.
  • Name the difference column score_difference.
  • Ensure results are ordered by employee_id and review_date.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 6
single

single

some-alt