Question
SQL Please help me by filling in the 5 blanks correctly with SQL commands. Thank you! Fill in the blanks in the SQL statement below
SQL Please help me by filling in the 5 blanks correctly with SQL commands. Thank you!
Fill in the blanks in the SQL statement below that will list the rows with an invoice_total that is greater than or equal to 500 and less than or equal to 1000. Sort in descending sequence by invoice total. Do not return duplicate rows. SELECT _____________* FROM invoices WHERE invoice_total BETWEEN 500 AND 1000 ORDER BY invoice_total DESC;
Fill in the blanks in the SQL statement below that will list the invoice number, invoice total and credit which is the total sum of the payment_total and credit_total. Format the payment credit to 2 decimal places.
SELECT invoice_number, invoice_total, _____________ AS credit FROM invoices;
Fill in the blanks in the SQL statement below that will list the invoice_id, vendor name, invoice_due_date and an extended date of 20 days for all invoices with an invoice_total greater than 3000. Name the new field extended due date.
SELECT invoice_id, name, invoice_due_date, DATE_ADD(invoice_due_date, _______________) AS extended_due_date FROM invoices, vendors WHERE invoices.invoice_id = vendors.invoice_id AND invoice_total > 3000 ;
Fill in the blanks in the SQL statement below that will list vendor name, sum of the invoice_total for that vendor. Include a grand total for all vendors at the end.
SELECT vendor_id, name, SUM( ____________ ) FROM vendors, invoices WHERE vendors_invoice_id = invoices_invoice_id GROUP BY vendor_id ______________ ;
Accounts Payable Database Listing Description of tables in the AP database Table: general_ledger_accounts general_ledger_accounts(account_number, description) Table: terms terms(terms_id, description, due_days) Table: vendor contacts vendor_contacts(contact_id, last_name, first_name) Table: vendor vendor(vendor_id, name, address1, address2, city, state, zip, phone, contact id, default_terms_id, default_account_number) Table: invoices invoices(vendor_id, number, invoice_date, invoice_total, payment_total, credit_total, terms_id, invoice_due_date, payment_date) Table: invoice_line_items invoice_line_items(invoice_id, sequence, a ccount number, amount, descriptiouStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started