看板 Database 關於我們 聯絡資訊
我現在想將2個select語法合成一個 select 日期,sum(F1) as Total from MyTable where Type='a' group by 日期 select 日期,sum(F1) as Total from MyTable where Type='b' group by 日期 假設2個select的結果是 日期 Total ==================== Type=a 2008/1/1 1000 2008/1/3 2000 ==================== Type=b 2008/1/2 1500 2008/1/3 3000 希望的結果 日期 Totala Totalb 2008/1/1 1000 2008/1/2 1500 2008/1/3 2000 3000 請問可以做到這樣嗎? THANKS^^ -- 《我的Blog》http://clubtblog.blogspot.com/ 你的資料如下 《ID暱稱》 () 《上站次數》次 《文章篇數》篇 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.136.36.136 ※ 編輯: ClubT 來自: 220.136.36.136 (07/29 17:54)