Reference no: EM133569909
Task 1: Using Northwind Database, write SQL statements for the following data retrieval operations.
Note: You may need to refer to the schema for the exact field names while framing the queries to the following questions. While framing the question, the words ‘code', ‘number' or ‘ID' may have been synonymously used. For instance, ‘Customer Number' when used may refer to a field called CustomerID. Similarly, wherever the word ‘name' is used, appropriate interpretation may be needed based on the schema - for instance if ‘customer name' is required to be printed, you may need to retrieve CompanyName field from the Customers Table; likewise, when ‘employee name' is required (without any further qualification, you may retrieve the lastname field of Employees table.
Excercise
Retrieve the first three letters of the employees' last names.
Retrieve the last two characters from the employees' last names.
Retrieve five characters from the employees' last names, starting at the second character.
Retrieve the firstname and lastname of employee. Output should be in the form of full name (firstname + "" + lastname) having first character in upper case for both firstname and lastname, and other characters in lower case.
Retrieve maximum, minimum and average of unitprice column from order details table.
Check whether each value in the PostalCode column of the Customers table are numeric or not.
Display the Day, Month and Year separetly of today's date.
Display day of year, day, week, weekday, hours, minutes and seconds of current day.
Display the dates respectively after adding 4 years, 2 months and 25 days to the current.
Display the day differences from Orders table between following:
a. Order date and required date.
b. Order date and shipped date.
c. Shipped date and required date.