Hi! Could we please enable some services and cookies to improve your experience and our website?
Privacy & Cookie Policy.Find the number of employees in each department. Output the name of the department DEPARTMENT and the number of employees in it EMP_COUNT. Sort the results by descending number of employees, then by department name alphabetically.
Use Firebird syntax to write your answer. Descriptions of tables are provided in the right pane.
Write your request in the field below and click the "Check it!" button.Employee is a sample database that comes with the Firebird cross-platform database management system. You can use this database to explore Firebird SQL and other DBMS features.
| COUNTRY | CURRENCY |
|---|---|
| USA | Dollar |
| JOB_CODE | JOB_GRADE | JOB_COUNTRY | JOB_TITLE | MIN_SALARY | MAX_SALARY | JOB_REQUIREMENT | LANGUAGE_REQ |
|---|---|---|---|---|---|---|---|
| CEO | 1 | USA | Chief Executive Officer | 130000.00 | 250000.00 | No specific requirements. | [null] |
| DEPT_NO | DEPARTMENT | HEAD_DEPT | MNGR_NO | BUDGET | LOCATION | PHONE_NO |
|---|---|---|---|---|---|---|
| 000 | Corporate Office | [null] | 105 | 1000000.00 | Monterey | (408) 555-1234 |
| EMP_NO | FIRST_NAME | LAST_NAME | PHONE_EXT | HIRE_DATE | DEPT_NO | JOB_CODE | JOB_GRADE | JOB_COUNTRY | SALARY | FULL_NAME |
|---|---|---|---|---|---|---|---|---|---|---|
| 2 | Robert | Nelson | 250 | 1988-12-28 00:00:00 | 600 | VP | 2 | USA | 105900.00 | Nelson, Robert |
| PROJ_ID | PROJ_NAME | PROJ_DESC | TEAM_LEADER | PRODUCT |
|---|---|---|---|---|
| VBASE | Video Database | Development of a video database management system for managing video distribution on demand. | 45 | software |
| EMP_NO | PROJ_ID |
|---|---|
| 144 | DGPII |
| FISCAL_YEAR | PROJ_ID | DEPT_NO | QUART_HEAD_CNT | PROJECTED_BUDGET |
|---|---|---|---|---|
| 1994 | GUIDE | 100 | [null] | 200000.00 |
| EMP_NO | CHANGE_DATE | UPDATER_ID | OLD_SALARY | PERCENT_CHANGE | NEW_SALARY |
|---|---|---|---|---|---|
| 28 | 1992-12-15 00:00:00 | admin2 | 20000.00 | 10.000000 | 22000.000000 |
| CUST_NO | CUSTOMER | CONTACT_FIRST | CONTACT_LAST | PHONE_NO | ADDRESS_LINE1 | ADDRESS_LINE2 | CITY | STATE_PROVINCE | COUNTRY | POSTAL_CODE | ON_HOLD |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1001 | Signature Design | Dale J. | Little | (619) 530-2710 | 15500 Pacific Heights Blvd. | [null] | San Diego | CA | USA | 92121 | [null] |
| PO_NUMBER | CUST_NO | SALES_REP | ORDER_STATUS | ORDER_DATE | SHIP_DATE | DATE_NEEDED | PAID | QTY_ORDERED | TOTAL_VALUE | DISCOUNT | ITEM_TYPE | AGED |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| V91E0210 | 1004 | 11 | shipped | 1991-03-04 00:00:00 | 1991-03-05 00:00:00 | [null] | y | 10 | 5000.00 | 0.100000 | hardware | 1.000000000 |