📊 Aggregation

GROUP BY patterns, windowed ranking and string aggregation with LISTAGG.

Snippet
☆Count Employees — Count all rows using COUNT(*)
☆Salary Stats per Dept — Show salary summary statistics grouped by department
☆LISTAGG (Names by Dept) — Concatenate group values into one string
☆RANK() by Salary — Ties share a rank; next rank is skipped
☆DENSE_RANK() by Dept — Rank within each department without gaps
☆Total Salary (SUM) — Total of a numeric column
☆Average Salary (AVG) — Average of a numeric column
☆Max Salary per Dept — Highest salary per department

← Back to all categories