1. Write a SELECT statement that returns these columns from the Instructors table: a. The monthly salary (the AnnualSalary column divided by 12) b. A column that uses the CAST function to return the monthly salary with 1 digit to the right of the decimal point c. A column that uses the CONVERT function to return the monthly salary as an integer d. A column that uses the CAST function to return the monthly salary as an integer 2. Write a SELECT statement that returns these columns from the Students table: a. The EnrollmentDate column A column that uses the CAST function to return the EnrollmentDate column with its date only (year, month, and day) b. A column that uses the CAST function to return the EnrollmentDate column with its full time only (hour, minutes, seconds, and milliseconds) c. A column that uses the CAST function to return the EnrollmentDate column with just the year and month 3. Write a SELECT statement that returns these columns from the Instructors table: a. The AnnualSalary column b. A column named MonthlySalary that is the result of dividing the AnnualSalary column by 12 c. A column named MonthlySalary Rounded that calculates the monthly salary and then uses the ROUND function to round the result to 2 decimal places 4. Write a SELECT statement that returns these columns from the Students table: a. The EnrollmentDate column A column that returns the four-digit year that's stored in the EnrollmentDate column b. A column that returns only the day of the month that's stored in the EnrollmentDate column c. A column that returns the result from adding four years to the EnrollmentDate column; use the CAST function so only the year is returned 5. Write a SELECT statement that returns these columns: a. The DepartmentName column from the Departments table b. The CourseNumber column from the Courses table c. The FirstName column from the Instructors table d. The Last Name column from the Instructors table e. Add a column that includes the first three characters from the DepartmentName column in uppercase, concatenated with the CourseNumber column, the first character of the FirstName column if this column isn't null or an empty string otherwise, and the LastName column. For this to work, you will need to cast the Course Number column to a character column.

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter5: Working With Multiple Worksheets And Workbooks
Section: Chapter Questions
Problem 4AYK
icon
Related questions
Question
100%

Need help writing SQL statements for these, I'm getting some errors for my returns.

1. Write a SELECT statement that returns these columns from the Instructors table:
a. The monthly salary (the AnnualSalary column divided by 12)
b. A column that uses the CAST function to return the monthly salary with 1 digit to the
right of the decimal point
c. A column that uses the CONVERT function to return the monthly salary as an integer
d. A column that uses the CAST function to return the monthly salary as an integer
2. Write a SELECT statement that returns these columns from the Students table:
a. The EnrollmentDate column A column that uses the CAST function to return the
EnrollmentDate column with its date only (year, month, and day)
b. A column that uses the CAST function to return the EnrollmentDate column with its full
time only (hour, minutes, seconds, and milliseconds)
c. A column that uses the CAST function to return the EnrollmentDate column with just the
year and month
3. Write a SELECT statement that returns these columns from the Instructors table:
a. The AnnualSalary column
b. A column named MonthlySalary that is the result of dividing the AnnualSalary column
by 12
c. A column named MonthlySalary Rounded that calculates the monthly salary and then
uses the ROUND function to round the result to 2 decimal places
4. Write a SELECT statement that returns these columns from the Students table:
a. The EnrollmentDate column A column that returns the four-digit year that's stored in
the EnrollmentDate column
b. A column that returns only the day of the month that's stored in the EnrollmentDate
column
c. A column that returns the result from adding four years to the EnrollmentDate column;
use the CAST function so only the year is returned
5. Write a SELECT statement that returns these columns:
a. The DepartmentName column from the Departments table
b. The CourseNumber column from the Courses table
c. The FirstName column from the Instructors table
d. The Last Name column from the Instructors table
e. Add a column that includes the first three characters from the DepartmentName
column in uppercase, concatenated with the CourseNumber column, the first character
of the FirstName column if this column isn't null or an empty string otherwise, and the
LastName column. For this to work, you will need to cast the Course Number column to
a character column.
Transcribed Image Text:1. Write a SELECT statement that returns these columns from the Instructors table: a. The monthly salary (the AnnualSalary column divided by 12) b. A column that uses the CAST function to return the monthly salary with 1 digit to the right of the decimal point c. A column that uses the CONVERT function to return the monthly salary as an integer d. A column that uses the CAST function to return the monthly salary as an integer 2. Write a SELECT statement that returns these columns from the Students table: a. The EnrollmentDate column A column that uses the CAST function to return the EnrollmentDate column with its date only (year, month, and day) b. A column that uses the CAST function to return the EnrollmentDate column with its full time only (hour, minutes, seconds, and milliseconds) c. A column that uses the CAST function to return the EnrollmentDate column with just the year and month 3. Write a SELECT statement that returns these columns from the Instructors table: a. The AnnualSalary column b. A column named MonthlySalary that is the result of dividing the AnnualSalary column by 12 c. A column named MonthlySalary Rounded that calculates the monthly salary and then uses the ROUND function to round the result to 2 decimal places 4. Write a SELECT statement that returns these columns from the Students table: a. The EnrollmentDate column A column that returns the four-digit year that's stored in the EnrollmentDate column b. A column that returns only the day of the month that's stored in the EnrollmentDate column c. A column that returns the result from adding four years to the EnrollmentDate column; use the CAST function so only the year is returned 5. Write a SELECT statement that returns these columns: a. The DepartmentName column from the Departments table b. The CourseNumber column from the Courses table c. The FirstName column from the Instructors table d. The Last Name column from the Instructors table e. Add a column that includes the first three characters from the DepartmentName column in uppercase, concatenated with the CourseNumber column, the first character of the FirstName column if this column isn't null or an empty string otherwise, and the LastName column. For this to work, you will need to cast the Course Number column to a character column.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr