SQL Question 1 Use HR database tables those are shown below. Write a query that shows: department name, the number of em

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

SQL Question 1 Use HR database tables those are shown below. Write a query that shows: department name, the number of em

Post by answerhappygod »

Sql Question 1 Use Hr Database Tables Those Are Shown Below Write A Query That Shows Department Name The Number Of Em 1
Sql Question 1 Use Hr Database Tables Those Are Shown Below Write A Query That Shows Department Name The Number Of Em 1 (85.04 KiB) Viewed 34 times
Sql Question 1 Use Hr Database Tables Those Are Shown Below Write A Query That Shows Department Name The Number Of Em 2
Sql Question 1 Use Hr Database Tables Those Are Shown Below Write A Query That Shows Department Name The Number Of Em 2 (235.21 KiB) Viewed 34 times
SQL Question 1 Use HR database tables those are shown below. Write a query that shows: department name, the number of employees in each department (include departments with 0 employees), min, max, and average salary for all the departments in the database. Then use UNION ALL to append at the end text: Totals and the total number of employees, average, min, and max salary for the entire company. Question 2 Use HR database tables those are shown below. Write a query to show employee id, last name, first name of all the employees, their managers, and the managers of their managers. You need to include the following columns in your result: EMPLOYEE_ID EmployeeLastName FirstLevelManagerFirstName SecondLevelManagerID Employee FirstName SecondLevelManagerLastName FirstLevelManagerID FirstLevelManagerLastName SecondLevelManagerFirstName ThirdLevelManagerlD
Database: HR, Tables: Regions Region ID Region_Name 1 Europe 2 3 Countries AR AU BE Country ID Country Name Region ID Argentina 2 Australia 3 1 2 2 US CA CH CN 4 DE DK EG FR IL Americas Asia Middle East and Africa Belgium USA Canada Switzerland China Germany Denmark Egypt France Israel 1 3 1 1 4 1 4 Location_id Street Address 1000 1100 1200 1297 Via Cola di Rie 93091 Calle della Testa 2017 Shinjuku-ku 9450 Kamiya-cho 2014 Jabberwocky Rd 2011 Interiors Blvd 2007 Zagora St 2004 Charade Rd 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 8204 Arthur St 2500 Magdalen Centre, The Oxford Science Park 2600 9702 Chester Road 147 Spadina Ave 6092 Boxwood St Locations 40-5-12 Laogianggen 1298 Vileparle (E) 12-98 Victoria Street 198 Clementi North 2700 Schwanthalerstr. 7031 2800 Rua Frei Caneca 1360 2900 20 Rue des Corps-Saints 3000 Murtenstrasse 921 3100 Pieter Breughelstraat 837 3200 Mariano Escobedo 9991 Postal Code City 989 Roma 10934 Venice 1689 6823 Tokyo Hiroshima 26192 Southlake 99236 50090 98199 M5V 2L7 YSW 9T2 190518 490231 2901 540198 OX9 9ZB 9629850293 80925 01307-002 1730 3095 3029SK 11932 South San Francisco South Brunswick Seattle Toronto Whitehorse Beijing Bombay Sydney Singapore London Oxford Stretford Munich Sao Paulo Geneva Bern Utrecht Mexico City State Province Tokyo Prefecture Texas California New Jersey Washington Ontario Yukon Oxford Manchester Bavaria Sao Paulo Geneve BE Country_ID Utrecht Distrito Federal, IT IT 5 5 5 5 3 3 3 2 2 US US US CA CA Maharashtra New South Wales AU CN SG UK UK UK DE BR CH CH NL MX
Departments DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID 10 Administration 20 Marketing 30 Purchasing 40 50 Shipping 60 70 80 90 100 Executive Finance 110 Accounting Treasury Corporate Tax Control And Credit 150 Shareholder Services 160 Benefits 170 Manufacturing Construction 120 130 140 180 200 210 Human Resources 190 Contracting Operations IT Support NOC 220 IT 230 Public Relations Sales 260 IT Helpdesk 240 Government Sales 250 Retail Sales Recruiting 200 201 114 203 121 103 204 145 100 108 205 0 0 0 0 0 O 0 0 0 0 0 0 0 0 1700 1800 1700 2400 1500 1400 2700 2500 1700 1700 1700 1700 1700 1700 1700 1700 1700 1700 1700 1700 1700 1700 1700 1700 1700 1700
Jobs Job_ID AD_PRES AD_VP FI_ACCOUNT FI_MGR IT_PROG Job Title President Administration Vice President Accountant Finance Manager Programmer Min_Salary 20080 15000 4200 8200 4000 Max_Salary 40000 30000 9000 16000 10000
Employees King Kochhar De Haan Hunold Ernst 0.00 EMPLOYEE_ID FIRST_NAME LAST NAME EMAIL PHONE NUMBER HIRE_DATE JOB_ID SALARY COMMISSION _PCT MANAGER_ID DEPARTMENT_ID SKING 515.123.4567 2003-06-17 AD PRES 24000.00 0.00 NKOCHHAR 515.123.4568 2005-09-21 AD_VP 17000.00 0.00 LDEHAAN 515.123.4569 2001-01-13 AD_VP 17000.00 0.00 AHUNOLD 590.423.4567 2006-01-03 IT PROG 9000.00 BERNST 590.423.4568 2007-05-21 IT_PROG 6000.00 0.00 DAUSTIN 590.423.4569 2005-06-25 IT PROG 4800.00 0.00 Pataballa VPATABAL 590.423.4560 2006-02-05 IT PROG 4800.00 0.00 Lorentz DLORENTZ 590.423.5567 2007-02-07 IT PROG 4200.00 0.00 Greenberg NGREENBE 515.124.4569 2002-08-17 FI_MGR 12008.00 0.00 DFAVIET 515.124.4169 2002-08-16 FI ACCOUNT 9000.00 0.00 JCHEN 515.124.4269 2005-09-28 FI_ACCOUNT 8200.00 0.00 ISCIARRA 515.124.4369 2005-09-30 FI_ACCOUNT 7700.00 Austin 0.00 ▸100 101 102 103 104 105 106 107 108 109 110 111 Steven Neena Lex Alexander Bruce David Valli Diana Nancy Daniel John Ismael Faviet Chen Sciarra 0 100 100 102 103 103 103 103 101 108 108 108 90 90 90 60 60 60 60 60 100 100 100 100
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply