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

Write a query to obtain a listing of all customer names, displaying the first le

ID: 662928 • Letter: W

Question

Write a query to obtain a listing of all customer names, displaying the first letter of the first and last names in upper case and the rest in lower case letters.

Write a query to obtain a listing of all book titles and the publication date (PUBDATE), displaying the date in the format of Month DD, YYYY. Be sure to format the month with the first letter as a capital (this can be done through the format mask itself).

Write a single query (not three separate ones) to obtain a listing of the average, minimum, and maximum cost (not Retail) for all books.

Write a query to obtain the number of customers that live in the state of Florida.

Explanation / Answer

1) we use INITCAP if we want to capitalize first letter and remaining letters lowercase....

so query will be SELECT INITCAP( FIRST_NAME), INITCAP(LAST_NAME) FROM CUSTOMERS;

2) for month dd and year format we use mm/dd/yyyy format

so query will be

SELECT BOOK_TITLES, TO_CHAR(PUBDATE,'MM/DD/YYYY) FROM BOOKS;

AVG -->(average)

max->(max)

MIN->(min)

so query will be:

SELECT AVG(RETAIL_COST), MAX(RETAIL_COST), MIN(RETAIL_COST) FROM BOOKS;

4)SELECT COUNT(*) FROM CUSTOMERS WHERE CUSTOMER_LIVE="Florida";

count(*) will give number....that matches....customer lives in florida.

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