Answers for "group by max date sql server"

SQL
4

min max sql group by

SELECT MIN(salary), MAX(salary) FROM employees;
SELECT team, MIN(salary), MAX(salary) FROM employees GROUP BY team;
Posted by: Guest on July-04-2021
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