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

MYSQL Exercises 1. Write a SELECT statement that returns the se columns from the

ID: 3599011 • Letter: M

Question

MYSQL

Exercises 1. Write a SELECT statement that returns the se columns from the Invoices table The invoice_total column A column that uses the ROUND function to return the invoice_total column with decimal digit A column that uses the ROUND function to return the invoice_total column with no decimal digits Write a SELECT statement that returns these columns from the Date_Sample table in the EX database: 2. The start_date column A column that uses the DATE_FORMAT function to return the start_date column with its month name abbreviated and its month, day, and two-digit year separated by slashes A column that uses the DATE_FORMAT function to return the start date column with its month and day returned as integers with no leading zeros, a two-digit year, and all date parts separated by slashes A column that uses the DATE_FORMAT function to return the start_date column with only the hours and minutes on a 12-hour clock with an am/pm indicator A column that uses the DATE_FORMAT function to return the start date column with its month returned as an integer with no leading zeros, its month, day, and two-digit year separated by slashes, and its hours and minutes on a 12-hour clock with an am/pm indicator

Explanation / Answer

Hi,

Ans 1-  
Query 1
select round(invoice_total,1) from invoices;

Query 2
select round(invoice_total,0) from invoices;

Ans 2-
Query 1
SELECT DATE_FORMAT(start_date, "%b/%d/%y") from date_sample;

Query 2
SELECT DATE_FORMAT(start_date, "%c/%d/%y") from date_sample;

Query 3
SELECT DATE_FORMAT(start_date, "%h:%i %p") from date_sample;

Query 4
SELECT DATE_FORMAT(start_date, "%c/%d/%y %h:%i %p") from date_sample;

Ans 3-
Query 1
select upper(vendor_name) from vendors;

Query 2
SELECT RIGHT(vendor_name,4) from Vendors;

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