Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the Chess database on atr, and the following query: SELECT Name FROM Players WHERE NOT EXISTS (SELECT Events.eID FROM Events WHERE Date = 2018-07-24
Consider the Chess database on atr, and the following query: SELECT Name FROM Players WHERE NOT EXISTS (SELECT Events.eID FROM Events WHERE Date = "2018-07-24" AND NOT EXISTS (SELECT * FROM Games WHERE ( PID = BlackPlayer OR PID = WhitePlayer ) AND Games. eID = Events.eID)); This query is supposed to find the names of players who played during all events that took place on 2018-07-24, but it may or may not work. What is wrong with the query? Hint: there is no need to run this query on the instance data in the real database, since it will return 0 rows. Remember to avoid query by instance, and your answer should assume that the query needs to work on all possible instances of the Chess database. In other words, don't look at the actual rows, just think about the query and the schemas. The date filter needs to be in the innermost nested select instead of the middle one There is a problem with the order of operations (precedence) in the innermost where clause The nested selects are out of order There is nothing wrong with it
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started