Using the Human Resources database, create a query that returns the following table exactly as shown Department Number o

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: 899604
Joined: Mon Aug 02, 2021 8:13 am

Using the Human Resources database, create a query that returns the following table exactly as shown Department Number o

Post by answerhappygod »

Using The Human Resources Database Create A Query That Returns The Following Table Exactly As Shown Department Number O 1
Using The Human Resources Database Create A Query That Returns The Following Table Exactly As Shown Department Number O 1 (16.48 KiB) Viewed 53 times
Using the Human Resources database, create a query that returns the following table exactly as shown Department Number of Total Employees Compensation Sales 34 304500.00 Shipping 45 156400.00 Executive 3 58000.00 Finance 6 51600.00 IT 5 28800.00 Purchasing 6 24900.00 Accounting 2 20300.00 Marketing 2 19000.00 Public Relations 1 10000.00 Human Resources 1 6500.00 Administration 1 4400.00 ATIDA ATPAL.

CREATE TABLE IF NOT EXISTS departments ( DEPARTMENT_ID` decimal(4,6) NOT NULL DEFAULT 'O', DEPARTMENT_NAME` varchar(30) NOT NULL, MANAGER_ID` decimal(6,0) DEFAULT NULL, "LOCATION_ID` decimal(4,0) DEFAULT NULL, PRIMARY KEY (DEPARTMENT_ID), KEY "DEPT_MGR_FK ("MANAGER_ID"), KEY DEPT_LOCATION_IX (LOCATION_ID") ) ENGINE=MyISAM DEFAULT CHARSET=latinl; -- Dumping data for table departments INSERT INTO departments ("DEPARTMENT_ID", "DEPARTMENT_NAME", "MANAGER_ID", "LOCATION_ID) VALUES ('10', 'Administration', '200', '1700'), ('20', 'Marketing', '201', '1800'), ('30', 'Purchasing', '114', '1700'), ('40', 'Human Resources', '203', '2400'), ('50', 'Shipping', '121', '1500'), ('60', 'IT', '103', '1400'), Public Relations! 294 270

CREATE TABLE IF NOT EXISTS employees ( EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT 'O', FIRST_NAME` varchar(20) DEFAULT NULL, LAST_NAME"varchar(25) NOT NULL, EMAIL" varchar(25) NOT NULL, PHONE_NUMBER varchar(20) DEFAULT NULL, HIRE_DATE date NOT NULL, * JOB_ID varchar(10) NOT NULL, SALARY decimal(8,2) DEFAULT NULL, COMMISSION_PCT decimal(2,2) DEFAULT NULL, MANAGER_ID decimal(6,0) DEFAULT NULL, DEPARTMENT_ID` decimal(4,0) DEFAULT NULL, PRIMARY KEY ( EMPLOYEE_ID), UNIQUE KEY "EMP_EMAIL_UK (EMAIL), KEY `EMP_DEPARTMENT_IX ( DEPARTMENT_ID"), KEY EMP_JOB_IX ( JOB_ID), KEY 'EMP_MANAGER_IX ("MANAGER_ID), KEY `EMP_NAME_IX ( LAST_NAME, FIRST_NAME") ) ENGINE=MyISAM DEFAULT CHARSET=latinl; -- Dumping data for table employees INSERT INTO `employees ( EMPLOYEE_ID`, `FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "HIRE_DATE", `JOB_ID, SALARY, COMMISSION_PCT", "MANAGER_ID`, `DEPARTMENT_ID) VALUES ('100', 'Steven', 'King', 'SKING', '515.123.4567', '1987-06-17', 'AD_PRES', '24000.00', '0.00', 'o', '90'), ('101', 'Neena', 'Kochhar', 'NKOCHHAR', '515.123.4568', '1987-06-18', 'AD_VP', '17000.00', '0.00', '100', '90'), ('102', 'Lex', 'De Haan', 'LDEHAAN', '515.123.4569', '1987-06-19', 'AD_VP', '17000.00', '0.00', '100', '90'),
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply