Successfully reported this slideshow.
Your SlideShare is downloading. ×

Display all records of employees who work in the Finance department-.docx

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 2 Ad

Display all records of employees who work in the Finance department-.docx

Download to read offline

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
.

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
.

Advertisement
Advertisement

More Related Content

Similar to Display all records of employees who work in the Finance department-.docx (20)

More from wviola (20)

Advertisement

Recently uploaded (20)

Display all records of employees who work in the Finance department-.docx

  1. 1. 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

×