Skip to content

Instantly share code, notes, and snippets.

View dritterman's full-sized avatar

Danny Ritterman dritterman

  • Melbourne, Australia
View GitHub Profile
1. List employees (names) who have a bigger salary than their boss
SELECT
e.`name`
FROM
employees AS e
INNER JOIN employees AS b ON e.bossid = b.employeeid
WHERE
e.salary > b.salary