You are on page 1of 2

Activity in SQL – Part 1

Business Information Management system

Instruction: Work on this activity as a group.

EMPLOYEE
Employee_ID Name Address Salary
1 Alavera, R-jay Pili, Camarines Sur 25,000.00
2 Emila, Lusarie Calabanga, Camarines Sur 10,000.00
4 Zamudio, Dixie Ann Polangui, Albay 35,000.00
5 Escobal, Abner Pili, Camarines Sur 5,000.00
7 Azon, Eloisa Camalig, Albay 20,000.00
8 De Jesus, Jane Camaligan, Camarines Sur 8,000.00
9 Bacolo, Aerron Donsol, Sorsogon 15,000.00
12 Alcantara, Concepcion Calabanga, Camarines Sur 30,000.00
13 Regnim, Joebel Sorsogon, Sorsogon 50,000.00
14 Reyes, Dustin Talisay, Camarines Norte 9,000.00
15 Avenido, Angelica Jones Tabaco, Albay 54,000.00
18 Sabila, Shien Pili, Camarines Sur 5,000.00
19 Coronel, Ma Concepcion Pili, Camarines Sur 12,000.00
20 Cabaltea, Emmanuel Daet, Camarines Norte 17,000.00
25 Castillo, Shiela Mercedez, Camarines Norte 30,000.00
30 Narvato, Kim John Pili, Camarines Sur 4,500.00
32 Marco, Mark Legazpi, Albay 7,000.00
35 Lafita, Marinel Bagacay, Albay 2,500.00
37 Valdez, Dan Goa, Camarines Sur 6,000.00
40 Rosario, Maricon Caramoan, Camarines Sur 75,000.00

Create the table above in Access. Using Structured Query Language (SQL), construct a
program that will return a query table for the following conditions.

1. Query1: List the name and addresses of employees who live in Camarines Sur.

2. Query2: List the name and addresses of employees who live in Camarines Sur and
Camarines Norte.

3. Query3: List the name, address, and salary of employees from Camarines Sur and Albay
who receive salaries below P10,000.

4. Query4: List all the fields and all the employees with their IDs arranged in ascending
order.
5. Query5: List all the fields and all the employees with their address arranged
alphabetically and salaries of employees within the same place arranged in descending
order.

6. Query6: Count the number of employees for each place/address.

7. Query7: List the places with more than 1 employee. Show the fields for place and
number of employees.

8. Query8: List all the fields and select employees who receive between P10,000 and
P50,000 salaries.

9. Query9: List the average salary of employees from every place in Camarines Sur and
Camarines Norte.

10. Query10: List places in Camarines Sur and Camarines Norte where the average salary of
employees is less than P10,000. Sort the result by address in descending order.

You might also like