Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote