我想誰在「傢俱」部門 工作的員工數目我有兩個表 教研室 的dept_id DEPT_NAME 100,服裝, 200,傢俱, 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
我想要計算具有特定SKU的商店(商店1-10)的不同數量。這裏是我的代碼: SELECT distinct COUNT(*) as total_store
FROM(
select distinct st.*
from (select st.*
from store_table st
)st
WHERE st.store between 1 and 10
select sum(total) from (
(select sum(team1_score) as total from country,match_results where country_name=team1 group by country_name as s1)
UNION ALL
(select sum(team2_score) as total from country,m