Lofback, Chris wrote:

> This throws an error:
>  
> ORA-00937: not a single-group group function

Forgot the GROUP BY:

SELECT *
FROM (
SELECT provider,
MAX(datestamp) AS lastDate
FROM table
GROUP BY provider
ORDER BY MAX(datestamp) DESC
) a
WHERE rownum < 8

Jochem
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to