Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Salary Progression Analysis | Ranking and Analytic Window Functions
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Window Functions in SQL

bookChallenge: Salary Progression Analysis

Завдання

Swipe to start coding

Write a query to analyze how each employee's current salary compares to the earliest salary in their department. Your query must return the following columns for each employee:

  • employee_id
  • name
  • department
  • salary
  • The earliest salary in the employee's department, based on the earliest hire_date
  • The difference between the employee's salary and the department's earliest salary.

Steps:

  • Use a window function to find the earliest salary in each department, ordered by hire_date.
  • Calculate the difference between each employee's salary and the department's earliest salary.
  • Return all required columns for each employee.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 7
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

bookChallenge: Salary Progression Analysis

Свайпніть щоб показати меню

Завдання

Swipe to start coding

Write a query to analyze how each employee's current salary compares to the earliest salary in their department. Your query must return the following columns for each employee:

  • employee_id
  • name
  • department
  • salary
  • The earliest salary in the employee's department, based on the earliest hire_date
  • The difference between the employee's salary and the department's earliest salary.

Steps:

  • Use a window function to find the earliest salary in each department, ordered by hire_date.
  • Calculate the difference between each employee's salary and the department's earliest salary.
  • Return all required columns for each employee.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 7
single

single

some-alt