标签:des style io ar art div line ad
SELECT B.DESCRIPTION,B.PLANNAME,COUNT(*) 案件數 FROM CASES A JOIN ( select b.DESCRIPTION,a.PLANNAME,MAX(PLANSN) PLANSN from [PLAN] a left join PLANTYPE b on a.TYPEID = b.TYPEID WHERE PLANNAME NOT LIKE ‘%停%‘ AND PLANNAME NOT LIKE ‘%測%‘ GROUP BY b.DESCRIPTION,a.PLANNAME ) B ON A.PLANSN = B.PLANSN WHERE B_DATETIME >= ‘2013/1/1‘ and B_DATETIME <= ‘2013/4/30‘ GROUP BY B.DESCRIPTION,B.PLANNAME ORDER BY 1
标签:des style io ar art div line ad
原文地址:http://www.cnblogs.com/jerain6312/p/3921321.html