For each of the following questions, write an example of a complete SQL syntax t
ID: 3547258 • Letter: F
Question
For each of the following questions, write an example of a complete SQL syntax that will produce the results specified. Do not include any extra SQL clauses that are not required by the question (for example, do not sort your results unless this has been specifically stated or implied by the requested data).
1. Display a list of all customer first and last names in order by the date they were acquired, starting with the most recent.
2. Display a list of customer first and last names for customers whose last names begin with either M or N.
3. For each type of account, show the number of customers we have with that account type.
Explanation / Answer
1)SELECT firstname,lastname from customers ORDER BY acquireddate DESC
2) SELECT firstname,lastname from customers WHERE firstname LIKE 'm%' OR firstname LIKE 'n%' OR lastname LIKE 'm%' OR lastname LIKE 'n%'
3) SELECT count(account_no) FROM customers GROUP BY account_type
100% sure of the answers
Do rate the answers bro :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.