看板 Database 關於我們 聯絡資訊
各位大大你好 我用SQL2000 SP4 (在DB上 我的權限只能query) 我有2個table a(課碼a1,課名a2) b(課碼b1,學號b2,分數b3) 我要如何同時算出 修課人數 和 及格人數 我的寫法是 select a.a2, count(*) as '修課人數', count(*) as '及格人數' from a,b where a.a1=b.b1 group by a.a1 order by a.a1 可是b.b3>=60 不知道要寫在哪邊 才能算出及格人數 -- 另外ROW_NUMBER() 在SQL2000也不用 這樣要如何產生流水號? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.118.99.140