PrepZone Logo
PrepZone
Back to Database

Database · Hard

Calculate the P95 salary using percentile functions.

DatabaseSQL QueriesStaff

Answer preview

Compute the 95th percentile with PERCENTILE_CONT(0.95) WITHIN GROUP (ORDER BY amount), and show PERCENTILE_DISC beside it to make the interpolated-vs-actual difference explicit.…