Display all records of employees who work in the Finance department: SELECT emp_id, emp_name, salary, dept_id FROM employee join department ON dept_id=dept_id WHERE dept_name=\'Finance\'; SELECT emp_id, emp_name, salary, dept_id FROM employee department WHERE employee.dept_id=department.dept_id AND WHERE dept_name=\'Finance\'; SELECT emp_id, emp_name, salary, dept_id FROM employee AND department WHERE employee.dept_id=department.dept_id AND dept_name=\'Finance\'; SELECT emp_id, emp_name, salary, employee.dept_id FROM employee join department ON employee.dept_id=department.dept_id WHERE dept_name=\'Finance\'; C or D Group records by dept-name; Display the Department name and total salary earned by all employees working in the Finance department. SELECT dept_name, COUNT(salary) FROM employee JOIN department ON employee.dept_id=department.dept_id WHERE dept_name=\'Finance\'; SELECT dept_name, SUM(salary) FROM employee JOIN department ON employee.dept_id=department.dept_id WHERE dept_name=\'Finance\'; SELECT dept_name, COUNT(salary) FROM employee JOIN department ON employee.dept_id=department.dept_id WHERE dept_name=\'Finance\'; GROUP BY dept_name;
Solution
27. the answer is d.
a. join syntax error
b. join keyword missing
c, and operator cant be used there to joid tables
28.
answer is d.
a. display error as group by is not used and also count salary columns not sum
b. display error as group by is not used
c. count salary columns not sum
.