a. The subquery returns more than 1 row. b. You need a JOIN ON clause to pull from multiple tables. c. You cannot have a subquery in the SELECT statement. d. The result is a Cartesian Product. e. There is nothing wrong with
Subject
What is wrong with this statement?
SELECT vendor_id, (SELECT vendor_name FROM vendors), avg(invoice_total) FROM invoices GROUP BY vendor_id;
Select one:
a. The subquery returns more than 1 row.
b. You need a JOIN ON clause to pull from multiple tables.
c. You cannot have a subquery in the SELECT statement.
d. The result is a Cartesian Product.
e. There is nothing wrong with this statement.
What is wrong with this statement?
SELECT vendor_name, avg(invoice_total) AS 'Invoice Total' FROM vendors v JOIN invoices i ON v.vendor_id = i.vendor_id
Select one:
a. You are missing the GROUP BY clause.
b. Nothing, this statement runs correctly.
c. The JOIN ON clause is incorrect.
d. Invoices should also be in the FROM clause.
e. You are using single quotes instead of double quotes.
- TIA
Trending now
This is a popular solution!
Step by step
Solved in 3 steps