Provide 1 .sql file that gives the SQL select statements that need to be used to
ID: 3851454 • Letter: P
Question
Provide 1 .sql file that gives the SQL select statements that need to be used to get the following results. Use the AP database from the book databases. You should have this created already.
1. I want to send a flyer to all Vendors who currently have an invoice that isn't paid. Give me a result set that will allow me to do that.
2. I want to know all of the invoices that have more than 1 item.
3. I want to know all of the invoices with 30, 60 and 90 day terms.
Help Fast! Thank you
Generic Table names are fine. Just please highlight them! Thank you
Explanation / Answer
Following are the SQL SELECT statements to get your desired OUTPUT.
1. I want to send a flyer to all Vendors who currently have an invoice that isn't paid.
SQL Statement: SELECT * FROM [Table_Name] where invoice != 'Paid';
2. I want to know all of the invoices that have more than 1 item.
SQL Statement: SELECT invoices FROM [Table_Name] GROUP BY invoices HAVING COUNT(item) > 1;
3. I want to know all of the invoices with 30, 60 and 90 day terms.
SQL Statement: SELECT invoices FROM [Table_Name] WHERE Day_Term in (30,60,90);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.