I'm getting the error " ORA-00907: missing right parenthesis" but I've checked and all the parenthesis are there, so I'm stumped.
My query is
SELECT
SUM(score) as score,
facebook_id,
firstname,
lastname,
dense_rank(score)
WITHIN GROUP ( ORDER BY score ) as rank_db
FROM
(
SELECT DISTINCT *
FROM
(
SELECT *
FROM fanta_score
ORDER BY score desc
) as f
GROUP BY
facebook_id, game_id
) as g
GROUP BY facebook_id
ORDER BY score DESC, created_at
LIMIT 50
I'm by no means an Oracle expert, but I have to use it due the hosting environment its has to be in.
LIMIT command isn't recognized in Oracle. And should use ROWNUM instead of Limit.