0 votes 0 votes if total_sales have all NULL entries then it will return all employee .please clarify. Prateek Raghuvanshi asked Dec 25, 2018 Prateek Raghuvanshi 487 views answer comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments Rishav Kumar Singh commented Dec 25, 2018 reply Follow Share @Shubhgupta you are right. This expression of the maximum seems consistent with mathematical logic, but fails completely in SQL: SELECT DISTINCT a FROM R WHERE a >= ALL (SELECT * FROM R) If R is empty, the query returns empty. The >= ALL test is vacuously true with an empty subquery , but there is no value of a to exploit the test. If R holds a NULL value, the query returns empty, because the test a >= ALL(...) returns unknown (not false!) for any NULL or maximum non-NULL integer value of a if the subquery includes a NULL value. 1 votes 1 votes srestha commented Dec 26, 2018 reply Follow Share yes, I think B) will be ans https://gateoverflow.in/118391/gate2017-2-46 0 votes 0 votes Prateek Raghuvanshi commented Dec 27, 2018 reply Follow Share @srestha ma'am if they say for non null value then B will be the right answer .But here null is allowed. 0 votes 0 votes Please log in or register to add a comment.