Scalar Functions
Outcomes
Use SQL to retrieve database information
The Problems
1. Select the distinct years in which employees were hired. Sort them so that the newest are on top
2. Display the names in person as (Last name, first name)
3. Return only the first word of each vehicle make
4. How many years difference is there between the newest and oldest hire date. (Just enter the dates manually. don't try to get them from the rows)
5. How many months are between the newest and oldest hires?
6. Format the phone numbers of the locations so they look like (206)555-1000
7. Format the prices of the auto services so that they have a $ sign
8.. Display the discount and tax percents in service detail as percents with a % sign. (You will have to multiply them by 100)
What I am looking for
I want to see the SQL for each problem
Each problem is worth 1 point except for 6 and 8 which are worth 2 points each for a total of 10 points
deally, copy and paste the code into a Google doc and share it with spconger@gmail.com. I will comment on the document
No comments:
Post a Comment