Advertisement
Old_But_Gold

Median MySQL

Aug 23rd, 2023
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. WITH ranked AS (
  2. SELECT lat_n,
  3. row_number() over(order by lat_n) as id
  4. from station
  5. )
  6.  
  7. SELECT ROUND(lat_n,4)
  8. FROM ranked
  9. WHERE id = (SELECT CEIL(COUNT(*)/2) FROM station);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement