Question

Oracle Assingment Introduction to databases Topics :Restricting and sorting data Create a query to display the...

Oracle Assingment

Introduction to databases
Topics :Restricting and sorting data

Create a query to display the last name and salary of employees earning more than 1200

Display the last name and salary for all employees whose salary is not in the range of 5,000 and 10,000

Display the employee last name, job ID, and start date of employees hired between February 20, 1998, and May 1, 1998. Order the query in ascending order by start date.

Display the last name and department number of all employees in departments 20 and 50 in alphabetical order by name. 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.

Display the last name and hire date of every employee who was hired in 1994 Display the last names of all employees where the third letter of the name is an a.

Display the last name of all employees who have an a and an e in their last name.

Display the last name, job, and salary for all employees whose job is sales representative or stock clerk and whose salary is not equal to $2,500, $3,500, or $7,000.

Homework Answers

Answer #1

QUERY FOR DISPLAYING

TOOK THE REFERENCE OF THE ORACLE ASSIGNMENT FOR THE SCHEMA OF THE GIVEN RELATION.

1 . Last Name And Salary Of Employees earning more than 1200 .

SELECT Last_name, Salary

FROM employees

WHERE salary > 1200;

2. Last name and Salary of Employees whose salary is not in the range 5000 and 10000

SELECT Last_name, Salary

FROM employees

WHERE Salary NOT BETWEEN 5000 AND 10000;

3. employee last name, job ID, and start date of employees hired between February 20, 1998, and May 1, 1998. Order the query in ascending order by start date.

SELECT Last_name, Job_id, start_date

FROM employees

WHERE start_date BETWEEN ’20-Feb-1998’ AND ’01-May-1998’ ORDER BY start_date;

4. last name and department number of all employees in departments 20 and 50 in alphabetical order by name.

SELECT last_name, department_id

FROM employees

WHERE department_id IN (20, 50)

ORDER BY last_name;

5.  last name and salary of employees who earn between $5,000 and $12,000, and are in department 20 or 50.

SELECT last_name "Employee", salary "Monthly Salary"

FROM employees

WHERE salary BETWEEN 5000 AND 12000 AND department_id IN (20, 50);

6 . last name and hire date of every employee who was hired in 1994

SELECT last_name, hire_date

FROM employees

WHERE hire_date LIKE ’%94’;

7. Display the last names of all employees where the third letter of the name is an a.

SELECT last_name

FROM employees

WHERE last_name LIKE ’__a%’;

8. Display the last name of all employees who have an a and an e in their last name.

SELECT last_name

FROM employees

WHERE last_name LIKE ’%a%’ AND last_name LIKE ’%e%’;

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
I am using Oracle HR. Write a query to display the last name of employees, length...
I am using Oracle HR. Write a query to display the last name of employees, length of the name, and first monday since the hire date. Make the query that the user is prompted to enter a letter that the last name start with by using a substitution variable for the letter. For example, if the user enters "H" or "h" when prompted, the output should show all employees whose start with letter H and make sure that the case...
Using the Company database in Oracle, construct SQL queries for the following (note: I will make...
Using the Company database in Oracle, construct SQL queries for the following (note: I will make the files to create and populate the Company database available on Isadore shortly): List the last name and address of managers who have a dependent with the same first name as themselves. Retrieve the names of all employees who are directly supervised by ‘Franklin Wong’. Retrieve the names of employees in the Research department who work more than 20 hours per week on the...
Introduction to Database Oracle Assingment Use any table of your choice for solving 1. Display all...
Introduction to Database Oracle Assingment Use any table of your choice for solving 1. Display all the information of the EMP table? 2. Display unique Jobs from EMP table? 3. List the emps in the asc order of their Salaries? 4. List the details of the emps in asc order of the Dptnos and desc of Jobs? 5. Display all the unique job groups in the descending order? 6. Display all the details of all ‘Mgrs’ 7. List the emps...
EMPLOYEE Field Name EMP_ID EMP_LNAME EMP_MI EMP_FNAME EMP_SEX EMP_AGE EMP_SALARY EMP_HIREDATE DEPT_CODE Table: DEPARTMENT DEPT_CODE BIOL...
EMPLOYEE Field Name EMP_ID EMP_LNAME EMP_MI EMP_FNAME EMP_SEX EMP_AGE EMP_SALARY EMP_HIREDATE DEPT_CODE Table: DEPARTMENT DEPT_CODE BIOL CPTR HIST MATH RELB Data Type Text Text Text Text Text Number Currency Date/Time Text DEPT_TITLE Biology Computer Science History Mathematics Religion    Field Name DEPT_CODE DEPT_TITLE Data Type Text Text INSTRUCTIONS Use SQL commands to create the tables and enter the data shown above using MS Access. Write the following SQL statement given below: 1. 2. 3. 4. 5. 6. 7. 8. 9....
Project Description: As the Human Resources Manager, you maintain employee salary data. You exported data from...
Project Description: As the Human Resources Manager, you maintain employee salary data. You exported data from the corporate database into an Excel workbook. You want to display subtotals for salary by city. For further analysis, you want to create a PivotTable to determine what the total salaries would be if employees who earn an Excellent rating get a 5% increase in salary. Finally, you want to create a PivotChart that depicts what percentage of employees earn each performance rating. Instructions:...
/* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following...
/* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following tables: VENDOR, PRODUCT, CUSTOMER, INVOICE, LINE EMPLOYEE and loads the default data rows */ set echo on; set serveroutput on; select systimestamp from dual; show user; ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'; DROP TABLE LINE CASCADE CONSTRAINTS; DROP TABLE INVOICE CASCADE CONSTRAINTS; DROP TABLE CUSTOMER CASCADE CONSTRAINTS; DROP TABLE PRODUCT CASCADE CONSTRAINTS; DROP TABLE VENDOR CASCADE CONSTRAINTS; DROP TABLE EMPLOYEE CASCADE CONSTRAINTS; CREATE TABLE...
Summary The Ch08_ConstructCo database stores data for a consulting company that tracks all charges to projects....
Summary The Ch08_ConstructCo database stores data for a consulting company that tracks all charges to projects. The charges are based on the hours each employee works on each project. The structure and contents of the Ch08_ConstructCo database are shown in Figure P8.1. Use this database to answer the following problems. Database Schema The schema for the Ch08_ConstructCo database is shown below and should be used to answer the next several problems. Click this image to view it in its own...
Wage and Tax Statement Data on Employer FICA Tax Ehrlich Co. began business on January 2,...
Wage and Tax Statement Data on Employer FICA Tax Ehrlich Co. began business on January 2, 20Y8. Salaries were paid to employees on the last day of each month, and social security tax, Medicare tax, and federal income tax were withheld in the required amounts. An employee who is hired in the middle of the month receives half the monthly salary for that month. All required payroll tax reports were filed, and the correct amount of payroll taxes was remitted...
Prevosti Farms and Sugarhouse pays its employees according to their job classification. The following employees make...
Prevosti Farms and Sugarhouse pays its employees according to their job classification. The following employees make up Sugarhouse's staff: Employee Number Name and Address Payroll information A-Mille Thomas Millen Hire Date: 2-1-2019 1022 Forest School Rd DOB: 12-16-1982 Woodstock, VT 05001 Position: Production Manager 802-478-5055 PT/FT: FT, exempt SSN: 031-11-3456 No. of Exemptions: 4 401(k) deduction: 3% M/S: M Pay Rate: $35,000/year A-Towle Avery Towle Hire Date: 2-1-2019 4011 Route 100 DOB: 7-14-1991 Plymouth, VT 05102 Position: Production Worker 802-967-5873...
Background You are a manager in the audit division at Miller Yates Howarth (MYH), an accounting...
Background You are a manager in the audit division at Miller Yates Howarth (MYH), an accounting firm with offices throughout the major regional centres of NSW and Queensland. Although a medium sized firm by national standards, MYH is the second largest regional accounting firm in Australia. Most of MYH’s audit clients are in the agriculture, mining, manufacturing and property industries. All of those industries are currently under pressure, either from a downturn in commodity prices or fierce competition from overseas...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT