select count(*) as c_customercount
from t_table
where c_date>=开始日期 and c_date<=结束日期 and c_customer='customervalue'

解决方案 »

  1.   

    select c_customer,sum(1) as  c_customercount
    from t_table
    where c_date>=开始日期 and c_date<=结束日期 group by c_customer
      

  2.   

    select c_customer,count(c_customer) as  c_customercount
    from t_table
    where c_date>=开始日期 and c_date<=结束日期 group by c_customer
      

  3.   

    燕子,给解释解释为什么SUM(1)也行啊,我试了,能出来,但不理解为什么SUM(1)也行
      

  4.   

    select count(c_customer)
    from t_table
    where c_date>=开始日期 and c_date<=结束日期
    group by c_customer having count(c_customer)>1
      

  5.   

    lalakid(princer) ( ) :具体试下就知
    SELECT 1
    SELECT SUM(1)
    是什么意思的了
      

  6.   

    to: internetcsdn(公元1979年8月10日)
    没有搞明白你说的是什么意思
    我们还是问问燕子吧~~~~~