Practice 3

Practice 3 - Round the number of months up to the closest...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ASSIGNMENT FOR AST AND ANT JUNE 2004(23 rd july 2004) Submission date: 26 th july 2004 Practice 3 1. Write a query to display the current date. Label the column Date. 2. Display the employee number, name, salary, and salary increase by 15% expressed as a whole number. Label the column New Salary. Save your SQL statement to a file named p3q2.sql . 3. Run your query in the file p3q2.sql . 4. Modify your query p3q2.sql to add an additional column that will subtract the old salary from the new salary. Label the column Increase. Rerun your query. 5. Display the employee’s name, hire date, and salary review date, which is the first Monday after six months of service. Label the column REVIEW. Format the dates to appear in the format similar to “Sunday, the Seventh of September, 1981.” 6. For each employee display the employee name and calculate the number of months between today and the date the employee was hired. Label the column MONTHS_WORKED. Order your results by the number of months employed.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Round the number of months up to the closest whole number. 7. Write a query that produces the following for each employee: <employee name> earns <salary> monthly but wants <3 times salary>. Label the column Dream Salaries. 8. Create a query to display name and salary for all employees. Format the salary to be 15 characters long, left-padded with $ . Label the column SALARY. 9. Write a query that will display the employee's name with the first letter capitalized and all other letters lowercase and the length of their name, for all employees whose name starts with J , A , or M . Give each column an appropriate label. 10. Display the name, hire date, and day of the week on which the employee started. Label the column DAY. Order the results by the day of the week starting with Monday. 11. Create a query that will display the employee name and commission amount. If the employee does not earn commission, put “No Commission.” Label the column COMM....
View Full Document

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Ask a homework question - tutors are online