select a.*,b.item_name from (select sum(buy_num) num,nqh from (select substr(a.embed_dis_province,1,10) dtime,b.buy_num,case substr(a.idcardcode,1,2) when '11' then '1100' when '12' then '1200' when '31' then '3100' when '50' then '5000' else substr(