Skip to content

Instantly share code, notes, and snippets.

@vincentdesmares
Last active May 12, 2017 00:11
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 vincentdesmares/23c20d6700ec1fc680078d72ed46d52f to your computer and use it in GitHub Desktop.
Save vincentdesmares/23c20d6700ec1fc680078d72ed46d52f to your computer and use it in GitHub Desktop.
SELECT
*,
min(salary)
OVER report_by_category,
avg(salary)
OVER report_by_category,
max(salary)
OVER report_by_category
FROM employe
WINDOW report_by_category AS (
PARTITION BY category )
LIMIT 5;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment