摘要: with temp_data as(select shareID,carID from dbo.che_ShareCar) select car_info.CARID, car_info.CAR_MARK , case when min(shareID) is null then 0 else COUNT(CAR_INFO.CARID) end as sharecount from dbo.CAR_INFO left join temp_data on CAR_INFO.CARID=temp_data.carID where COMPANYID=2 --and shareID is not n 阅读全文
posted @ 2011-08-02 17:02 Devin Mao 阅读(200) 评论(0) 推荐(0) 编辑