I have a query like this
我有一个这样的查询
select
*
from
(select vtid
from Transaction_tbl
where dtime between '01-Apr-13 00:00:00' and '18-Jun-13 23:59:59'
and Status >= 5) p
PIVOT
(count(vtid) FOR vtid in ([7],[8],[9],[11],[12])) as pp
select