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;