how to retrieve the top 3 salaries of the table using rownum
Answers were Sorted based on User's Feedback
Answer / vivek dubey
select salary_column from salary_table
where rownum<4
order by salary_column desc
Is This Answer Correct ? | 24 Yes | 42 No |
Source is Sales Table: Sno Prod Sales Sales_Amount 1 A 10 2000 2 A 20 1000 3 C 10 3000 4 D 30 4000 5 A 20 1000 Target : Sales_Count T_Sales_Amt Sales_Count(A) T_Sales_Amt(A) 90 11000 50 4000 In single query, pls tell me.
How do you write an inner join query?
Define sql delete statement.
Why do we use triggers?
What are sql data types?
Can a foreign key have a different name?
What is partition by in sql?
what is global table
How can use stored procedures in sql?
How to create your own reports in sql developer?
HOW TO TUNE ORACLE SQL QUERIES GIVE ME STEP BY SREP
How to avoid using cursors? What to use instead of cursor and in what cases to do so?