select count(Email) from Tabcustomer  
这个sql语句是:表示所有时间里注册的email个数,,如何按月来分,,把这个表的时间按 月来 显示出来每个月的注册人数,
比如显示出来:
-------------
1月|100
2  |200
3  |150 

解决方案 »

  1.   

    注册时间:RegisterDateselect month(RegisterDate) D,count(Email) Cnt from TabCustomer
    group by month(RegisterDate)
      

  2.   

    select month(Regtime) ,count(Regtime) from TabCustomer group by month(Regtime)
    这样的能用,你的编译出错
      

  3.   

    select month(Regtime) AS 月份,count(Regtime) AS 数量 from TabCustomer group by month(Regtime) 
      

  4.   

    select month(Regtime) AS 月份,count(Regtime) AS 数量 from TabCustomer group by month(Regtime)