Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Find High Earners by Department | Nested Subqueries in the WHERE section
Generate Nested Subqueries in SQL
セクション 1.  4
single

single

Challenge: Find High Earners by Department

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

タスク

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

Write a SQL query to list all employees whose salary is higher than the average salary of their department. Use a correlated subquery in the WHERE clause to compare each employee's salary to the average salary for their department.

  • Select the employee_id, first_name, last_name, salary, and department_id columns from the employees table.
  • For each employee, use a correlated subquery in the WHERE clause to calculate the average salary for their department.
  • Include only those employees whose salary is greater than the average salary of their department.

解答

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

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

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

セクション 1.  4
single

single

AIに質問する

expand

AIに質問する

ChatGPT

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

some-alt