Skip to content

Instantly share code, notes, and snippets.

@YannisAm
YannisAm / MySQL_practice_problems.md
Created November 16, 2022 11:25 — forked from wgopar/MySQL_practice_problems.md
MySQL Employees Sample Database exercise problems + solutions.

MySQL practice problems using the Employees Sample Database along with my solutions. See here for database installation details.

Problem 1

Find the number of Male (M) and Female (F) employees in the database and order the counts in descending order.

SELECT gender, COUNT(*) AS total_count
FROM employees 
GROUP BY gender