Introduction to Relational Databases Challenge 2.3 (WGU)
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 = 'USA') AND billing_country = 'Canada'; c.) SELECT AVG(total) FROM invoice WHERE total (SELECT * FROM invoice WHERE billing_country = 'Canada') AND billing_country = 'USA'; d.) SELECT * FROM invoice WHERE total SELECT AVG(total) FROM invoice WHERE billing_country = 'Canada' AND billing_country = 'USA'; Which of the following queries will use a subquery to find the rows in the invoice table that have been invoiced after and that have an invoice total larger than the maximum total of invoices of those in the country Belgium? a.) SELECT * FROM invoice WHERE total SELECT MAX(total) FROM invoice WHERE billing_country = 'Belgium' AND invoice_date ''; b.) SELECT * FROM invoice WHERE total (SELECT MAX(total) FROM invoice WHERE invoice_date '') AND billing_country = 'Belgium';
Información del documento
- Subido en
- 8 de noviembre de 2023
- Número de páginas
- 15
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas