0% found this document useful (0 votes)
8 views9 pages

FINALREQ1

1. The document provides instructions for a final requirement involving creating and querying multiple database tables - ORDER, SALES, and EMPLOYEE tables. 2. For each table, the student is instructed to write SQL queries to retrieve records that meet certain conditions on fields like purchase amount, order date, commission amount, department number, and employee names. 3. The student is also asked to format and save their work in MS Word using their full name as the file name.

Uploaded by

Raiza Mantawil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views9 pages

FINALREQ1

1. The document provides instructions for a final requirement involving creating and querying multiple database tables - ORDER, SALES, and EMPLOYEE tables. 2. For each table, the student is instructed to write SQL queries to retrieve records that meet certain conditions on fields like purchase amount, order date, commission amount, department number, and employee names. 3. The student is also asked to format and save their work in MS Word using their full name as the file name.

Uploaded by

Raiza Mantawil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Final Requirement

Name: Mantawil, Raiza M. Crs/Yr/Sc: 2BSInfoSysA

General Instructions:
a) Each item provides screen shots of your code and output and paste it in MS Word.
b) Save your work and follow this format FAMILY NAME, FIRSTNAME MIDDLE NAME (ex. GENOTIVA, ELIZABETH
REVECHE)

ORDER TABLE

1. CREATE DATABASE
Note that you will use your complete name as your database name.

2. Create an ORDER table.


3. From the following table, write a SQL query to find details of all orders with a purchase amount less than
200 or exclude orders with an order date greater than or equal to '2012-02-10' and a customer ID less than
3009. Return ord_no, purch_amt, ord_date, customer_id and salesman_id.
4. From the following table, write a SQL query to find all orders that meet the following conditions. Exclude
combinations of order date equal to '2012-08-17' or customer ID greater than 3005 and purchase amount
less than 1000.

5. From the following table, write a SQL query to find all Purchase amount greater than 1000 but less than
2000.
SALES TABLE

2. Create a SALES table.


3. From the following table, write a SQL query to find the details of those salespeople whose commissions
range from 0.10 to 0.12. Return salesman_id, name, city, and commission.

4. From the following table, write a SQL query to find the details of those salespeople whose commissions
range from 0.10 to 0.12 except from San Jose. Return salesman_id, name, city, and commission.
5. From the following table, write a SQL query to find the details of those salespeople whose commissions
beyond 0.10 to 0.12. Return salesman_id, name, city, and commission.
EMPLOYEE TABLE

2. Create an EMPLOYEE table.


3. From the following table, write a SQL query to find the details of all employees whose last name is ‘Dosni’ or
‘Mardy’. Return emp_idno, emp_fname, emp_lname, and emp_dept.

4. From the following table, write a SQL query to find the employees who work at depart 47 or 63. Return emp_idno,
emp_fname, emp_lname, and emp_dept.
5. From the following table, write a SQL query to find the employees who work not in depart 47 or 63 and whose first
name contain letter ‘n’. Return emp_idno, emp_fname, emp_lname, and emp_dept.

You might also like