Below is My Table:
Image 1.
Now Query Is:
SELECT YEAR, MAX(AMOUNT) AS MAXSALARY,
MIN(AMOUNT) AS MINSALARY
FROM EMPLOYEE_SALARY
GROUP BY YEAR
Image 2.
How we can find MAX & MIN salary in a Table Group By Year.
SELECT YEAR, MAX(AMOUNT) AS MAXSALARY,
MIN(AMOUNT) AS MINSALARY
FROM EMPLOYEE_SALARY
GROUP BY YEAR
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegisterMembers onlyeBook · SQLSupabase in Practice: Build and Ship Production Apps on Postgres, from First Table to LaunchDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Join the conversation! Your thoughts help the community grow.