Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Top 3 Salaries per Department | Ranking and Analytic Window Functions
Window Functions in SQL
セクション 2.  2
single

single

bookChallenge: Top 3 Salaries per Department

メニューを表示するにはスワイプしてください

タスク

スワイプしてコーディングを開始

Write a query to list the top 3 employees by salary in each department using a ranking window function.

  • Select the employee_id, name, department, and salary columns.
  • Use a ranking window function to assign a rank to each employee within their department, ordered by salary in descending order.
  • Return only those employees whose rank is 3 or less.
  • Order the results by department, then by salary descending, and then by name.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 2.  2
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt