0 0 votes Databases sql query + – Rudra Pratap 2.4k views answer comment Share Follow Print See all 14 Comments 14 14 Comments reply Show 11 previous comments Shubhgupta commented Sep 1, 2018 reply Follow flag your assumption is wrong try that gate 2005 question and come to this. you will understand better. and (a,1) count is 3, it means that there are 3 rows which are having greater salary then a. 0 0 replyShare Deepanshu commented Sep 2, 2018 i edited by Deepanshu Sep 2, 2018 reply Follow flag @Shubhgupta @MiNiPanda MY MISTAKE :/ I AM NOT THINKING ABOUT COORELATED RELATION 0 0 replyShare Shaik Masthan commented Sep 2, 2018 reply Follow flag @minipanda we can write it in that form also... Even in C also we can write in that way... coming to co-related query, form a sample table which can give different result for different options, then run the query on that table... This is a simple method ( as per my opinion ) 1 1 replyShare Please log in or register to add a comment.
1 1 vote C. This is a correlated nested query. Where inner query gives a count of employee having more salary than the employee in outer query and 2 checks that only 2 people have more salary than him. sidlewis answered Sep 1, 2018 sidlewis comment Share Follow 0 reply Please log in or register to add a comment.