Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Does Common Table Expression works in livesql?

user-38g9pApr 30 2023

Hi Everyone,

Trying below CTE but its giving error as “ORA-00928: missing SELECT keyword”

WITH my_cte AS
(SELECT sal, DENSE_RANK() OVER (ORDER BY sal DESC) AS denserank FROM scott.emp);

SELECT * FROM my_cte WHERE denserank = 3;

I cant see anything wrong, but it doesnt seem to work. Any suggestion or anything wrong im doing here. Please let me know.

Comments
Post Details
Added on Apr 30 2023
1 comment
323 views