SQL Practice Logo

SQLPractice Online

Level 2 - JuniorQuery-Based Questions

Department Payroll Snapshot

Return department_name, employee_count, and avg_salary for departments with at least 3 employees. Sort by avg_salary descending.

Schema Context

employees(id, name, department_id, salary), departments(id, name)