Oracle
 sql >> Base de données >  >> RDS >> Oracle

Oracle SQL GROUP BY n'est pas une aide d'expression GROUP BY

 select id, other_id, date_value, value from
 (
   SELECT id, other_id, date_value, value, 
   ROW_NUMBER() OVER (partition by other_id order BY Date_Value desc) r
   FROM some_table 
   WHERE other_id IN (1, 2, 3) 
 )
 where r = 1