0 votes 0 votes Databases sql query + – Rudra Pratap asked Sep 1, 2018 Rudra Pratap 970 views answer comment Share Follow See all 14 Comments See all 14 14 Comments reply Show 11 previous comments Shubhgupta commented Sep 1, 2018 reply Follow Share 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 votes 0 votes Deepanshu commented Sep 2, 2018 i edited by Deepanshu Sep 2, 2018 reply Follow Share @Shubhgupta @MiNiPanda MY MISTAKE :/ I AM NOT THINKING ABOUT COORELATED RELATION 0 votes 0 votes Shaik Masthan commented Sep 2, 2018 reply Follow Share @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 votes 1 votes Please log in or register to add a comment.
1 votes 1 votes 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 See all 0 reply Please log in or register to add a comment.