Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SKILL multiplied by ATTITUDE equals COMPETENCY Topics: SQL SELECT Select DISTINCT WHERE clause and operators Objective: Determine the correct SQL statements for each number based

image text in transcribed

"SKILL multiplied by ATTITUDE equals COMPETENCY" Topics: SQL SELECT Select DISTINCT WHERE clause and operators Objective: Determine the correct SQL statements for each number based from the given tblEmployee table. 1. Create a database named dbPayroll 2. Add a table inside the db Payroll named tblEmployee 3. The following are the attributes/columns in the tblEmployee table: employeeld, firstName, midinit, lastName, sex, age, civilStatus, telNum, street, barangay, city, salary 4. Insert at least 15 employee information in your tblEmployee table. Answer the following Queries: (Determine the correct SQL statements for each number based from the given tblEmployee table.) 1. Display all information of all employees. 2. What is the telephone number of employee "X (complete name)? 3. What is the complete name of an employee with an employee id *X(specify an ID)? 4. Display all information of employees who are living in street (Balite), Barangay (Lagao), and city (General Santos). 5. Display the complete name of employees who are living in address *X or address *Y. (specify the complete address) 6. Display the complete name and address of employees with a first name starting with "X. 7. Display the complete name, age and sex of employees whose age ranges from 10 to 20. (note: age 10 and 20 should be included) 8. Display all information of employees with first names that contain the pattern Jose' or the pattern Maria'. 9. Display the complete name and the telephone numbers of employees with the last name that ends with the letter 'a'. 10. Display the ID number, complete name and sex of employees who are not living in Davao and who are *X years old. 11. Display only unique (different) values of age. 12. Display all information of employees who are less than 20 years old. Display your answer in alphabetical order (ascending lastName, and from youngest to oldest). 13. Display only unique (different) values of age who are female. 14. Display the age of employees whose given name ends with letter X (e). "SKILL multiplied by ATTITUDE equals COMPETENCY 15. Retrieve the average salary. 16. Display the total number of employees whose salary is above the average. 17. Determine the total number of employees per sex(male or female). 18. Display the full names of employees whose salary is above the average salary. 19. Display the highest salary for each city. 20. Lists the number of employees in each city. Only include cities with more than 5 employees

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago