Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write SQL query How many employees work for each Department? EMPLOYEE TABLE DEPA

ID: 3594965 • Letter: W

Question

write SQL query
How many employees work for each Department?

EMPLOYEE TABLE

DEPARTMENT TABLE

please right-click on the image and select "open image in new tab" so u can see clearly

Thank you

MANAGEMENT MIDTER MIDTERM SQL File 3 ACCOUNT Context Help Snippets Server Status Client Connections 1SELECT FROM MIDTERM_Zelada.EMPLOYEE: Automatic context help is disabled. Use the toolbar to manually get help for the current caret position or to toggle automatic help. Users and Privileges Status and System Variables Data Export Data Import/Restore INSTANCE B Startup Shutdown PERFORMANCE Dashboard Performance Reports Performance Schema Setup Result Grid a Searc | Edit: , Export,import: Eg Fitter Rows: EMPID END DATE FIRST NAME LAST NAME START DATE TITLE ASSIGNED BRANCHJD DEPT ID SUPERIOR EMP ID 2001-0622 President 2002-09-12 Vice Presidant 2000-02-09 Treasure SCHEMAS Q Filter objects E! ACC-TRANSACTION 15 Jom Gooding BRANCH BUSINESS 2003-11-14Loan Manager 2004-03-17 Head Teller 2004-09-15 Teller 2002-12-02 Teller CUSTOMER Groasma 2002-05-03 Teller 2002-07-27 Hoad Teller 2000-10-23 Teller 2003-01-08 Teller 2000-6-11 Head Taller 2002-08-0 eller 2003-04-01 Teller 2001-03-15Head Teller 2002-06-29 Teller 2002-12-12 Teller DEPARTMENT EMPLOYEE Semantha Jameson Columns Markham Foreign Keys Triggers Tulman INDIVIDUAL ULL OFFICER PRODUCT PRODUCTTYPE - Stored Procedures Object Info Session Action Output Table: EMPLOYEE Action Duration Fetch Time 0.00029 sec / 0.000... 0.00033 soc / 0.000... Time 136 01:54:23 SELECT count(DEPTID) FROM EMPLOYEE LIMIT 0, 1000 1 row(s) returned 18 row(s) returned EMP ID 137 01:55:08 SELECT FROM MIDTERM Zelada.EMPLOYEE LIMIT 0, 1000

Explanation / Answer

Select count(Emp_ID) from EMPLOYEE inner join DEPARTMENT on EMPLOYEE.DEPT_ID = DEPARTMENT.DEPT_ID group by DEPARTMENT.DEPT_ID ;

The query returns number of Employees in each Department even if there is no Employee in any of the Department .If there is no Employee in a Department it returns 0.