Skip to content

Instantly share code, notes, and snippets.

@sobrinho
Created May 31, 2022 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sobrinho/4b75ae1e82566c161345cfd808fdec67 to your computer and use it in GitHub Desktop.
Save sobrinho/4b75ae1e82566c161345cfd808fdec67 to your computer and use it in GitHub Desktop.
SELECT name, COUNT(*)
FROM absences
GROUP BY name
ORDER BY COUNT(*) DESC
FETCH FIRST 3 ROWS WITH TIES;
name | count
------------+-------
John Doe | 2392
Jane Doe | 1960
Richard Doe | 1898
Robert Doe | 1898
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment