看板 Database 關於我們 聯絡資訊
※ 引述《tracy217 (T大)》之銘言 : ;with temp_aaa as : ( : select ID : FROM table : where date BETWEEN '20000101' AND '20031231' : Except : select ID : from table : where func_date BETWEEN '19960101' AND '19991231' : ) : select count(distinct id ) as id_cnt : ,date : from table as a : where exists (select 1 from temp_aaa b where a.id = b.id ) and date BETWEEN '20000101' AND '20031231' : group by date : 這樣寫呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.248.228.2