in Databases
382 views
1 vote
1 vote

in Databases
by
382 views

3 Comments

0 should be the answer
2
2
edited by
I am getting 4. Select* from professor P1 where P1.rating > ALL( 8.5,8.5) ,<-- that's why I am getting 4.

please explain how 0?

This a correlated query, therefore each tuple of P2 will be compared with P3. And for innermost query output should 5 for 8.5. What did I miss?
0
0
0
0

1 Answer

0 votes
0 votes

for Inner Query Check https://gateoverflow.in/273528/self-doubt-sql

Inner Query Gives ( 8.7, 9.7, 9.8, 8.7) 

then Outer Query

Select *

from Profesor P1

Where P1.rating > ALL(8.7, 9.7, 9.8)          /*     eleminate duplicate because it is Set of Value    */

WIll Give  as Output

 

Related questions