0
我想誰在「傢俱」部門 工作的員工數目我有兩個表 教研室 的dept_id DEPT_NAME 100,服裝, 200,傢俱,選擇 - 加入具有和組通過PLSQL
2.sales emp_id,sales_amt,dept_id
我已經做了這個..但它沒有顯示任何結果。
select count(emp_id) from department a join sales b on a.dept_id = b.dept_id group by dept_id having dept_name='furniture';
我知道我可以使用這個(因爲我知道傢俱的dept_id = 200):
select count(emp_id) from sales group by dept_id having dept_id=200;
,但我想知道的是在第一個代碼問題。
Tahnk你的幫助。 – Paras