日期:2014-05-17 浏览次数:20719 次
select substr(cardId,1,2),count(*)
from _log
where time between btime and etime
group by substr(cardId,1,2)
select xid, count(*)
from (select t.*, substr(cardId, 1, 2) xid
from _log t
where time between 'YYYYMMDD' and 'YYYYMMDD')
group by xid;