0 votes 0 votes why doesn’t the option D is correct .it is not the case that always 2nd highest salary employee will be selected newdreamz a1-z0 asked Jan 2, 2019 newdreamz a1-z0 429 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Kunal Kadian commented Jan 2, 2019 reply Follow Share Yes you are correct. D should be the ans. E2 is Employees with highest salary and E1 will be all others. 1 votes 1 votes Somoshree Datta 5 commented Jan 2, 2019 reply Follow Share Answer given by made easy is correct. It will always select those employees who have the second highest salary. Look at the second condition in the relational calculus query: it says that there doesnt exist an employee E3 in Employee whose salary is greater than the salary of employee E2(who is recieving the highest salary). 0 votes 0 votes Kunal Kadian commented Jan 2, 2019 reply Follow Share @Somoshree Datta 5 yeah so? There is no comparison between E3 and E1. E3 condition only tells us that E2 has highest salary, nothing else. Ans D is correct. Take a test case and see. 0 votes 0 votes Somoshree Datta 5 commented Jan 2, 2019 reply Follow Share At first you are comparing between E1 and E2 and then u r comparing with E2 and E3..so off course there is an indirect comparison between E1 and E3. 0 votes 0 votes Kunal Kadian commented Jan 2, 2019 reply Follow Share Nope. Here there is no comparison between E1 and E3, direct or indirect. Here they are saying, E2.sal> E1 and for all E3, E2.sal >= E3.sal Now E1.sal can be greater than E3.sal or it can be less than E3.sal. Don't let the question trick you. TAKE AN EXAMPLE AND SEE. emp no. 1,2,3 Salary 30k, 20k, 10k Here 10k will also be selected. If E2 is at 30k, E1 is at 10k, E3 will iterate over all 3 rows. 0 votes 0 votes Somoshree Datta 5 commented Jan 2, 2019 reply Follow Share ya i got my mistake..its a corelated query..i missed this part out..thanks! 0 votes 0 votes Please log in or register to add a comment.