Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Urgent Urgent if you can solve this fast Database Systems SQL queries SQL Queries : Consider the following Relational schema and Relations instances. (30 points)

Urgent Urgent if you can solve this fast Database Systems SQL queries

SQL Queries : Consider the following Relational schema and Relations instances. (30 points)

Employee (Empid, EmpName,Department , ContactNo ,EmailId,EmpHeadId) EmpSalary (EmpId, Salary ,IsPermanent ) Project (EmpId,Project,StartYear,EndYear)

image text in transcribed

Write SQL queries that will do the following

Create the table EmpSalary, set the referential integrity cascade when user update or delete an employee. *

Select the detail of the employee whose name start with P. *

How many permanent candidate take salary more than 5000. *

Select the detail of employee whose emailId is in gmall. *

What is total salary that is paid to permanent employees? *

How many project started in year 2010. *

How many project started and finished in the same year. *

Select the name of the employee who is supervised by Abhishek. *

Display the id of employees with salaries >= 800 and

Write an SQL query to fetch the list of employees with the same salary. *

Write an SQL query to fetch the names of workers who earn the highest salary. *

Display the employee information not working in department E-101 *

Display all employees in descending order by the employee name *

Finds the average salaries of all employees *

Lists the number of employees in each department *

Employee Empid EmpName 101 Isha 102 Priya 103 Neha 104 Rahul 105 Abhishek Department ContactNo Emailid EmpHeadId E-101 1234567891 isha@gmail.com 105 E-104 1234567892 priya@yahoo.com 103 E-101 1234567893 neha@gmail.com 101 E-102 1234567894 rahul@yahoo.com 105 E-101 1234567895 abhishek@gmail.com 102 EmpSalary Project EmpId 101 102 103 104 105 Salary 2000 10000 5000 1900 2300 IsPermanent Yes Yes No Yes Yes EmpId Project StartYear EndYear 101 p-1 2010 2010 102 p-2 2010 2012 103 p-1 2013 104 p-4 2014 2015 105 p-4 2015

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_2

Step: 3

blur-text-image_3

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

1.. Apply steps to revise and proofread a business message.

Answered: 1 week ago

Question

3. Who would the members be?

Answered: 1 week ago

Question

4. Who would lead the group?

Answered: 1 week ago