Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Which of the following queries will use a subquery to find the rows in the invoice table in the country USA that have the invoice

Which of the following queries will use a subquery to find the rows in the invoice table in the country USA that have the invoice total larger than the average of invoices of those in the country Canada?
a.)
SELECT * FROM invoice
WHERE total >
(SELECT AVG(total) FROM invoice
WHERE billing_country = 'Canada')
AND billing_country = 'USA';
b.)
SELECT * FROM invoice
WHERE total >
SELECT AVG(total) FROM invoice
WHERE billing_country = 'Canada'
AND billing_country = 'USA';
c.)
SELECT * FROM invoice
WHERE total >
(SELECT AVG(total) FROM invoice
WHERE billing_country = 'USA')
AND billing_country = 'Canada';
d.)
SELECT AVG(total) FROM invoice
WHERE total >
(SELECT * FROM invoice
WHERE billing_country = 'Canada')
AND billing_country = 'USA';

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions