1. 列出所有員工檔 和 銷售業績檔的所有紀錄 select * from employ; select * from salesrecord; 2. 列出每一位員工的 代號 姓名 銷售業績總額 select employ.emp_id, employ.empname, sum(salesrecord.amount) as sales_total from employ left join salesrecord on employ.emp_id = salesrecord.emp_id group by employ.emp_id, employ.empname 3. 列出每一位員工的 代號 姓名 每月最高的銷售業績 select employ.emp_id, employ.empname, ISNULL((MAX(salesrecord.amount)),0) as sales_total, DATEPART(MONTH,salesrecord.date) as month from employ left join salesrecord on employ.emp_id = salesrecord.emp_id group by employ.emp_id, employ.empname, DATEPART(MONTH,salesrecord.date) order by employ.emp_id; 4. 列出銷售檔的每人 平均業績 最高業績 最低業績 select employ.emp_id, ISNULL(avg(amount),0) as avg, ISNULL(max(amount),0) as max, ISNULL(min(amount),0) as min from salesrecord right join employ on salesrecord.emp_id = employ.emp_id group by employ.emp_id; 5. 列出五月份每位員工的 代號 銷售比數 銷售總金額,沒有業績的員工要顯示 select employ.emp_id, COUNT(DATEPART(MONTH,salesrecord.date)) a...