6 6 votes Consider the following relational query on the above database: SELECT S.name FROM Suppliers S Where S.sid NOT IN (SELECT C.sid FROM Catalog C WHERE C.pid NOT IN (SELECT P.pid FROM Parts P WHERE P.color <>'blue')) Find the names of all suppliers who have supplied non-blue part. Find the names of all suppliers who have not supplied non-blue part. Find the names of all suppliers who have supplied only non-blue parts Find the names of all suppliers who have not supplied only non-blue part. Databases isro2015 databases sql ambiguous + – go_editor 6.9k views answer comment Share Follow Print See 1 comment 1 1 comment reply Ritwik commented May 3, 2017 reply Follow flag Ans (C) 5 5 replyShare Please log in or register to add a comment.
4 4 votes Answer : A Find the names of all suppliers who have supplied non-blue part. The sub-query “SELECT P.pid FROM Parts P WHERE P.color<> ‘blue’” gives pids of parts which are not blue. The bigger subquery “SELECT C.sid FROM Catalog C WHERE C.pid NOT IN (SELECT P.pid FROM Parts P WHERE P.color<> ‘blue’)” gives sids of all those suppliers who have supplied blue parts. The complete query gives the names of all suppliers who have supplied a non-blue part shekhar chauhan answered Jun 17, 2016 shekhar chauhan comment Share Follow See all 7 Comments 7 7 Comments reply Show 4 previous comments Arjun commented Jun 25, 2016 reply Follow flag ISRO answer key is interesting here :) https://drive.google.com/open?id=0B8_aYGBndW4Hd2JNWDYxYlVpYlU 0 0 replyShare sushmita commented Apr 4, 2017 reply Follow flag answer should be C 0 0 replyShare naincy commented Apr 5, 2017 reply Follow flag ans is c 0 0 replyShare Please log in or register to add a comment.
0 0 votes Answer will be option A and C both as per ISRO-2015 modified answer keys. Anindita answered Jun 26, 2016 Anindita comment Share Follow See 1 comment 1 1 comment reply Arjun commented Apr 5, 2017 reply Follow flag That itself is a contradiction :) 1 1 replyShare Please log in or register to add a comment.
0 0 votes Take an example: suppliers catalog parts --------------------------------------------------------------------------------------------------------- sid sid pid pid color -------------------------------------------------------------------------------------------------------- 1 1 22 22 Blue 2 23 Red Answer (B) Sushant Gokhale answered Sep 28, 2016 Sushant Gokhale comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Answer in (C) Part. Explanation --> anonymous answered Apr 20, 2017 anonymous comment Share Follow 0 reply Please log in or register to add a comment.