Computers and Technology
Computers and Technology, 29.01.2021 17:30, agm0102

The HR department needs your assistance in creating some queries. 1. Because of budget issues, the HR department needs a report that displays the last name and salary of employees earning more than $12,000. Save your SQL statement as a file named lab_02_01.sql. Run your query.
2. Open a new SQL Worksheet. Create a report that displays the last name and department number for employee number 176.
3. The HR departments needs to find employees with high salary and low salary. Modify lab_02_01.sql to display the last name and salary for all employees whose salary is not in the range of $5,000 to $12,000. Save your SQL statement as lab_02_03.sql.
4. Create a report to display the last name, job ID, and hire date for employees with the last names of Matos and Taylor. Order the query in ascending order by hire date.
5. Display the last name and department ID of all employees in departments 20 or 50 in ascending alphabetical order by name.
6. Modify lab_02_03.sql to list the last name and salary of employees who earn between $5,000 and $12,000, and are in department 20 or 50. Label the columns Employee and Monthly Salary, respectively. Resave lab_02_03.sql as lab_02_06.sql. Run the statement in lab_02_06.sql.
7. The HR department needs a report that displays the last name and hire date for all employees who were hired in 1994.
8. Create a report to display the last name and job title of all employees who do not have a manager.
9. Create a report to display the last name, salary, and commission for all employees who earn commissions. Sort data in descending order of salary and commissions. Use the column’s numeric position in the ORDER BY clause.
10. Members of the HR department want to have more flexibility with the queries that you are writing. They would like a report that displays the last name and salary of employees who earn more than an amount that the user specifies after a prompt. (You can use the query created in practice exercise 1 and modify it.) Save this query to a file named lab_02_10.sql. a. Enter 12000 when prompted for a value in a dialog box. Click OK
11. The HR department wants to run reports based on a manager. Create a query that prompts the user for a manager ID and generates the employee ID, last name, salary, and department for that manager’s employees. The HR department wants the ability to sort the report on a selected column. You can test the data with the following values: manager _id = 103, sorted by last_name manager_id = 201, sorted by salary manager_id = 124, sorted by employee_id If you have the time, complete the following exercises (Optional)
12. Display all employee last names in which the third letter of the name is "a." SELECT last_name FROM employees WHERE last_name LIKE '__a%'; 13. Display the last names of all employees who have both an "a" and an "e" in their last name. SELECT last_name FROM employees WHERE last_name LIKE '%a%' AND last_name LIKE '%e%';
If you want an extra challenge, complete the following exercises: 14. Display the last name, job, and salary for all employees whose job is that of a sales representative or a stock clerk, and whose salary is not equal to $2,500, $3,500, or $7,000. SELECT last_name, job_id, salary FROM employees WHERE job_id IN ('SA_REP', 'ST_CLERK') AND salary NOT IN (2500, 3500, 7000); 15. Modify lab_02_06.sql to display the last name, salary, and commission for all employees whose commission amount is 20%. Resave lab_02_06.sql as lab_02_15.sql. Rerun the statement in lab_02_15.sql. SELECT last_name "Employee", salary "Monthly Salary", commission_pct FROM employees WHERE commission_pct = .20;

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 07:00, bskyeb14579
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
image
Computers and Technology, 24.06.2019 03:30, mprjug6
Which explains extrinsic motivation? a)motivation in which there is a reward b)motivation that is personally satisfying c)motivation that is personally meaningful d)motivation in which the subject is interesting
Answers: 1
image
Computers and Technology, 24.06.2019 16:50, Laylahlettiere
Develop the program incrementally: a) start by reading and displaying each line of the input file to make sure you are reading the data set correctly. b) use the split string method to extract information from each line into a list. print the list to prove that this step is working correctly. d) convert the exam scores to type int and calculate the student’s average. display those items to prove this step is working correctly. e) create a tuple containing the six items for each student (name, exam scores, exam mean). display the tuples to prove this step is working correctly. (optionally, you may want to have the exam scores in a list so your tuple is (name, scores_list, f) append each tuple to a list. display the list to prove this step is working correctly. g) use the sort list method to re-order the tuples in the list. display the list to prove this step is working correctly. h) use a for statement to display the contents of the list as a table (with appropriate formatting). i) use a for statement to calculate the average of all scores on exam #1, then display the results. note that you could have calculated this average within the first loop, but we are explicitly requiring you to do this calculation by looping though your list of tuples. j) add the logic to calculate the average of all scores on exam #2, then display the results.
Answers: 2
image
Computers and Technology, 25.06.2019 06:50, izaiahfieods
Write a program that will askthe user to enter the amount of a purchase. the program should thencompute the state and county sales tax. assume the state sales tax is4 percent and the county sales tax is 2 percent. the program should displaythe amount of the purchase, the state tax, the county sales tax, the total salestax, and the total of the sale. (which is the sum of theamount of purchase plus the total sales tax). hint: use the value 0.02 torepresent 2 percent, and 0.04 to represent 4 percent.
Answers: 2
Do you know the correct answer?
The HR department needs your assistance in creating some queries. 1. Because of budget issues, the...

Questions in other subjects: