Qtr No. 213, New Town Yehlanka Indore 454775
Tom, a database admin has written below query on employee table as per business requirement. What would be the output?
employee:
Column Name | Data Type/Size | Description | Constraints |
emp_id | integer | Employee id | primary key |
emp_name | varchar (30) | Employee name | not null |
emp_doj | date | Employee date of joining | not null |
emp_salary | integer | Employee salary | not null |
dept_id | integer | Department id | not null |
Query:
SELECT dept_id, emp_doj, SUM (emp_salary) FROM employee GROUP BY ROLLUP (dept_id, emp_doj);
It will calculate department wise total salary as well as department and date of joining wise total salary. It also calculates grand total salary of all the employees irrespective of departments they work in.
It will calculate department wise total salary as well as department and date of joining wise total salary.
It will calculate department wise total salary and grand total salary of all the employees irrespective of departments they work in.
It will calculate only grand total salary of all employees irrespective of departments they work in.
To get all Infosys Certified PostgreSQL Associate Exam questions Join Group https://bit.ly/infy_premium_group
We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.
Qtr No. 213, New Town Yehlanka Indore 454775
admin@prepflix.in