Tom, a database admin has written below query on employee table as per business requirement. What would be the output?

employee:

Column NameData Type/SizeDescriptionConstraints
emp_idintegerEmployee idprimary key
emp_namevarchar (30)Employee namenot null
emp_dojdateEmployee date of joining not null
emp_salaryintegerEmployee salarynot null
dept_idintegerDepartment idnot 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.

Correct Option - a

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