Why i'm getting an error like ORA-00907: missing right parenthesis
in below query?
SELECT * FROM
(
SELECT * FROM
USER_HISTORY as rounda
INNER JOIN USER_HISTORY as roundb
ON rounda.user_login_name=roundb.user_login_name
AND rounda.updated_on < roundb.updated_on
ORDER BY updated_on DESC
)
as baseview
GROUP BY user_login_name;
I don't think Oracle lets you use an ORDER BY within a sub-query. Can you move it outside (to the end of the main query)?
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks