Employee ( Eid, Ename,EAge, ECity, E_Street, E_House#, E_Basic_Salary, E_Bonus,E_Rank, E_Department) Eid is Primary E_Rank can be “Manager, Developer, Admin” E_Department can be “HR, CS, IT, Labour” Employee Age between 18 and Default value for department is “CS”. Project( p_id, pName, p_bonus,duration_in_months, Eid) Pid and Eid combine makes Primary NOTE: Eid in project is foreign key from Employee. Write SQL Queries for the following statements. Display whole address of employee along with name, columns names must be “Emp Name” and “Address”. Display 30% top records of Display names of all those employees whose address is “house number 44, street no 25, Rwp”. Display data of employees who lives in “isb or rwp or khi or lhr”. (do not use or keyword) Display those employees whose age is more than 18 and less than 33. (do not use relational operators “ > or <”. Display all those employees whose name starts with “S” and does not contain “I” in Display all cities of employee. (city name must not repeat) Display All employees of “isb”. Employees must be displayed from younger to older. Younger first and older Display name of employee and total salary of employee. (total salary is sum of basic salary and bonus) Display total number of Display total number of employees working in each Display Total expenditures of company. (total expenditures = basic salary + bonus of employee + all project bonus) Display names of projects in which ‘Ahmar’ is Display total project bonus of ‘Danish’. Display total expenditures of only those departments whose total expenditures are more than 1 Million. (total expenditures = sum of basic salary of all employees of that department) Create Employee Create Project Insert a record in employee table, ( you must not enter edepartment and ebonus). change basic salary of all employees, add increment of 5% to Delete only those employees whose salary is above Change data type employee bonus to “float”. Assume that you forgot to add primary key in Employee table, write a code that add a primary key in employee Drop primary key constraint you created in above Add a new column ‘e_father_name’ in employee Drop E_age column from employee

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter6: Managing Multiple Worksheets And Workbooks
Section: Chapter Questions
Problem 4.4CP
icon
Related questions
Question

Employee ( Eid, Ename,EAge, ECity, E_Street, E_House#, E_Basic_Salary, E_Bonus,E_Rank, E_Department)

  • Eid is Primary
  • E_Rank can be “Manager, Developer, Admin”
  • E_Department can be “HR, CS, IT, Labour”
  • Employee Age between 18 and
  • Default value for department is “CS”.

 

Project( p_id, pName, p_bonus,duration_in_months, Eid)

  • Pid and Eid combine makes Primary

 

NOTE: Eid in project is foreign key from Employee. Write SQL Queries for the following statements.

  • Display whole address of employee along with name, columns names must be “Emp Name” and “Address”.

 

 

 

 

  • Display 30% top records of

 

 

 

 

  • Display names of all those employees whose address is “house number 44, street no 25, Rwp”.

 

 

 

 

  • Display data of employees who lives in “isb or rwp or khi or lhr”. (do not use or keyword)

 

 

 

 

  • Display those employees whose age is more than 18 and less than 33. (do not use relational operators “ > or <”.

 

 

 

 

  • Display all those employees whose name starts with “S” and does not contain “I” in

 

 

 

  • Display all cities of employee. (city name must not repeat)

 

 

 

 

  • Display All employees of “isb”. Employees must be displayed from younger to older. Younger first and older

 

 

 

 

  • Display name of employee and total salary of employee. (total salary is sum of basic salary and bonus)

 

 

 

 

  • Display total number of

 

 

 

 

  • Display total number of employees working in each

 

 

 

 

  • Display Total expenditures of company. (total expenditures = basic salary + bonus of employee + all project bonus)

 

 

 

 

  • Display names of projects in which ‘Ahmar’ is

 

 

 

 

  • Display total project bonus of ‘Danish’.

 

 

 

  • Display total expenditures of only those departments whose total expenditures are more than 1 Million. (total expenditures = sum of basic salary of all employees of that department)

 

 

 

 

  • Create Employee

 

 

 

 

 

  • Create Project

 

 

 

 

  • Insert a record in employee table, ( you must not enter edepartment and ebonus).

 

 

 

 

  • change basic salary of all employees, add increment of 5% to

 

 

 

 

  • Delete only those employees whose salary is above

 

 

 

 

  • Change data type employee bonus to “float”.

 

 

 

 

  • Assume that you forgot to add primary key in Employee table, write a code that add a primary key in employee

 

 

 

  • Drop primary key constraint you created in above

 

 

 

 

  • Add a new column ‘e_father_name’ in employee

 

 

 

 

  • Drop E_age column from employee
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,