Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following relational database schema: SALESMAN table [ [ SALESMAN _ ID , NAME,CITY,COMMISSION ] ] ORDERS table [ [ ORD _
Consider the following relational database schema:
SALESMAN
tableSALESMANIDNAME,CITY,COMMISSION
ORDERS
tableORDNOPURCHAMT,CUSTOMERIDSALESMANID
Which of the following SQL statements is NOT correct?
a SELECT SALESMANID AS COL FROM SALESMAN WHERE CITY LIKE d UNION
SELECT COMMISSION AS COL FROM SALESMAN WHERE SALESMANID
ALL;
b SELECT COUNT NAME AS COUNT FROM SALESMAN WHERE SALESMANID ALL
SELECT SALESMANID FROM ORDERS WHERE PURCHAMT ;
c SELECT CITY FROM SALESMAN WHERE NAME LIKE a LEFT INTERSECT SELECT
CITY FROM SALESMAN WHERE SALESMANID ALL;
d None of the above.
Consider the following relational database schema:
SALESMAN
tableSALESMANIDNAME,CITY,COMMISSION
ORDERS
Which of the following SQL statements is NOT correct?
a SELECT DISTINCT ORDNO FROM SALESMAN S FULL JOIN ORDERS O ON
SSALESMANIDOSALESMANID WHERE CITY NOT IN New York', 'Paris';
b SELECT COUNTDISTINCT NAME AS COUNT FROM SALESMAN WHERE
SALESMANID ALL SELECT SALESMANID FROM ORDERS WHERE PURCHAMT
;
c SELECT NAME FROM SALESMAN GROUP BY CITY WHERE COMMISSION;
d None of the above.
Consider the following relational database schema:
SALESMAN
tableSALESMANIDNAME,CITY,COMMISSION
ORDERS
tableORDNOPURCHAMT,CUSTOMERIDSALESMANID
Which of the following SQL statements is NOT correct?
a SELECT COUNTDISTINCT CITY AS COUNT FROM SALESMAN WHERE
SALESMANID ANY SELECT SALESMANID FROM ORDERS WHERE PURCHAMT
;
b SELECT CITY, MAXCOMMISSION AS M FROM SALESMAN WHERE NAME LIKE e
GROUP BY CITY;
c SELECT NAME FROM SALESMAN WHERE AVGCOMMISSION;
d None of the above.
Consider the following database state and SQL query result.
Query Result
SALESMAN
ORDERS
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