Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve this accordingly for Database Management System Request: Please write the answers in a notebook (White Paper), scan the image of your notebook and

Please solve this accordingly for "Database Management System"

Request: Please write the answers in a notebook (White Paper), scan the image of your notebook and upload it. Make sure your handwriting is clear, concise and fully credible.

image text in transcribed

image text in transcribed

1. Write a query to retrieve student_id, name, cgpa of students from a student_info table. 2. List the name, job_position, employee_id of employees from the employees_info table who have a salary between 50000 and 100000 ordered by salary 3. List the name, id, and cgpa of students from the students_info table where they possess Magna cum' GPA status and having names starting with Aand ending with 'a'. 4. Create a database XYZ_Company' with the following tables: Employees (name, id, position, team, department, team_leader) Administration (name, company_id, sector) Team Leader (name, id, department, team) Department_Head (name, id, department) 5. Based on question 4, list the name, id, position of employees and their team leader's name where the team is 'Microservices' and the department is 'Engineering 6. Based on question 4, concat the Team Leader name and department Head name by joining the two tables, name the column as Department Info and use the following format Department head is and Team Leader is . where names are respectively of department Head name and team leader name 7. Create a table named employee_new as follows: employee_id (int), first_name (varchar), last_name (varchar), email (varchar), phone_number (varchar), hire_date date, job_id (int), salary (int) and maximum 999999, commission_pct float, manager_id (int), department_id (int) 8. From the employee' table, write an SQL statement to find employee id, phone number, and 5 years' salary as Five-years-salary'. 9. From the employee' table, write SQL statement to find employee id, concatenation of the first name and last name and space between first name and last name and show column header as the name. 10. Write SQL statement to find employee id, first name, and last name for all employees whose first name contains s or the last name ends with t. 11. Write SQL statement to find employee id, last name, job id, department id for all employees with department id = 50 and salary is higher than 5000 in descending order of salary. 12. Write SQL statement to find employee id, first name, job id, and hire date of those employees whose job_id is IT_PROG and higher date after first January 2006. 13. Find the job id and the maximum, minimum, and average salaries for each job id for all employees with a total salary higher than 5000 and a total salary less than 50000. Show the result in descending order of average salary. 14. Show Department names, the total number of employees and the total salary of each department for those departments with department id greater than or equal to 50 and the total salary is higher than 20000. Show the result in descending order of total salary. Note: When you see terms like from this table then you will assume you have a table under that name and write your queries accordingly

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions