你的两个表之间有关联字段吗?你比较的时候是Addtime 有限制吗?
把表结构写出来把

解决方案 »

  1.   

    基本没关联
    Usr
    ID, AddTimeResult
    UID, SuperRetail, RetailUsr.ID = Result.UID
      

  2.   

    顶呀,高手。
    TO  churchatp1
    直接联系可以吗? 真的很急。现金谢你都行呀。
    QQ 13994912
    MSN [email protected]
      

  3.   

    select 
                         case 
                         when datediff(year,birthdate,getdate()) >0 and datediff(year,birthdate,getdate()) <=10  then '1-10'
                         when datediff(year,birthdate,getdate()) >60 and datediff(year,birthdate,getdate()) <=70  then '61-70'
                         when datediff(year,birthdate,getdate()) >70  then '70以上'
                        end cdes ,count(*) crs
                    from person 
    自己改改吧
    20分给我哦