Answers for "group by get max value"

SQL
0

SQL get max per id

select name, max(value)
from out_pumptable
group by name
Posted by: Guest on October-29-2020
0

group by max date

SELECT train, dest, time FROM ( 
  SELECT train, dest, time, 
    RANK() OVER (PARTITION BY train ORDER BY time DESC) dest_rank
    FROM traintable
  ) where dest_rank = 1
Posted by: Guest on August-09-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language