SQL Please help me in put in the correct SQL commands in the 6 blanks ______ bel
ID: 3591098 • Letter: S
Question
SQL Please help me in put in the correct SQL commands in the 6 blanks ______ below. Thank you in advance!
Fill in the blanks in the SQL statement below that will list the invoice number, vendor contact initials (first letter of first name and first letter of second name example: M.D.) and the invoice date for vendors that have not paid a payment on the invoice.
SELECT invoice_number, CONCAT( ___________ , ‘.’, , ____________ ‘.’ )
AS initials, invoice_date
FROM vendor, vendor_contacts, invoices
WHERE invoices.vendor_id = vendors.vendor_id
AND vendors.contact_id = vendor_contacts. contact_id
AND payment_total = 0.0;
Fill in the blanks in the SQL statement below that will list the invoice number, vendor name and the invoice date for vendors that have not paid a payment on the invoice. Format the invoice date as DD-Mon-YYYY (example: 28-Mar-2017).
SELECT invoice_number, name, ____________
FROM vendors, invoices
WHERE invoices.vendor_id = vendors. vendor_id
AND payment_total = 0.0;
Fill in the blanks in the SQL statement below that will list the invoice_id, invoice_total and the invoice_date for invoices with amounts over $1000. Format the invoice date as DD/MM/YYYY (example: 3/28/2017). Round invoice amount to one decimal place.
SELECT invoice_id, ___________, DATE_FORMAT(invoice_date, ___________ )
FROM invoices
WHERE invoice_total > 1000;
Fill in the blanks in the SQL statement below that will list the vendor name where the vendor’s address2 would be NULL.
SELECT name
FROM vendors
WHERE address2 ________________;
Explanation / Answer
Fill in the blanks in the SQL statement below that will list the invoice number, vendor contact initials (first letter of first name and first letter of second name example: M.D.) and the invoice date for vendors that have not paid a payment on the invoice.
SELECT invoice_number, CONCAT(first_name,1 , ‘.’, last_name,1, ‘.’ )
AS initials, invoice_date
FROM vendor, vendor_contacts, invoices
WHERE invoices.vendor_id = vendors.vendor_id
AND vendors.contact_id = vendor_contacts. contact_id
AND payment_total = 0.0;
-----------------------------------------------------------------------------------------------------------------------------------------------------
Fill in the blanks in the SQL statement below that will list the invoice number, vendor name and the invoice date for vendors that have not paid a payment on the invoice. Format the invoice date as DD-Mon-YYYY (example: 28-Mar-2017).
SELECT invoice_number, name, format(invoice_due_date, 'DD-Mon-YYYY') FROM vendors, invoices
WHERE invoices.vendor_id = vendors. vendor_id
AND payment_total = 0.0;
--------------------------------------------------------------------------------------------------------------------------------------
Fill in the blanks in the SQL statement below that will list the invoice_id, invoice_total and the invoice_date for invoices with amounts over $1000. Format the invoice date as DD/MM/YYYY (example: 3/28/2017). Round invoice amount to one decimal place.
SELECT invoice_id, round(invoice_total,1), DATE_FORMAT(invoice_date, 'DD/MM/YYYY')
FROM invoices
WHERE invoice_total > 1000;
-------------------------------------------------------------------------------------------------------------------------------------------
Fill in the blanks in the SQL statement below that will list the vendor name where the vendor’s address2 would be NULL.
SELECT name
FROM vendors
WHERE address2 = 'NULL';
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.