Questions
4510_COMP_SCI_X_0019 Quiz 4
Single choice
Which of the following SQL queries will list only the Full Names of all Customers who made Purchases on 2019-04-02?
Options
A.SELECT *
FROM Customer INNER JOIN Purchase
on Customer.CustID = Purchase.CustID;
B.SELECT GivenName,FamilyName
FROM Customer INNER JOIN Purchase
on Customer.CustID = Purchase.CustIDWHERE PurchaseDate = '2019-04-02';
C.SELECT * FROM Customer AND Purchase
WHERE PurchaseDate LIKE '2019-04-02';
D.SELECT GivenName,FamilyName
FROM Customer INNER JOIN Purchase
on Customer.CustID = Purchase.CustID
WHERE PurchaseDate = '2019-04-02';
View Explanation
Verified Answer
Please login to view
Step-by-Step Analysis
We start by restating the problem in our own words and then evaluate each option.
Option 1:
SELECT *
FROM Customer INNER JOIN Purchase
on Customer.CustID = Purchase.CustID;
This query selects all columns from the joined Customer and Purchase tables for every matching row. It does not filter by a specific PurchaseDate, so it will list all purchases across all dates, and will also include many columns beyond Just GivenName and FamilyName. Therefore, it does not meet the requirement of listing only the Full Names for purcha......Login to view full explanationLog in for full answers
We've collected over 50,000 authentic exam questions and detailed explanations from around the globe. Log in now and get instant access to the answers!
Similar Questions
Candy Database Candy ( CandyType char(15), Cost dec(9,2), Colour char(10)) People ( PersonName char(20), Age smallint, Suburb char(20), PhoneNumber char(10)) Likes ( PersonName char(20), CandyType char(15)) Use the drop down lists to re-write the following query as a INNER JOIN. Select C.CandyType, Cost, PersonName From Candy C, Likes L Where C.CandyType = L.CandyType And PersonName like '%Peter%' Select C.CandyType, Cost, PersonName [ Select ] From Candy C INNER JOIN Likes L INNER JOIN People P L Likes INNER JOIN C Candy From Candy C INNER JOIN Likes L [ Select ] On C.CandyType = L.CandyType Where C.CandyType = L.CandyType On C.CandyType = P.PersonName [ Select ] Having P.PersonName like '%Peter%' Where PersonName like '%Peter%' And PersonName like '%Peter%'
Creating an "Outer Join" in Access will produce ONLY Null Values.
The default join type in Access is the outer join.
Below are the Movies and Sales table of a relational database: Dexter has created the following SQL query: SELECT tblMovies.Title, tblMovies.Genre, tblSales.CopiesFROM tblMovies, tblSalesWHERE tblMovies.MovieID = tblSales.MovieID How many records will be returned by the query?
More Practical Tools for Students Powered by AI Study Helper
Making Your Study Simpler
Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!