查询09年1-12月的车主数据样本

select *

into per_rain..aa_qingdao_car

from

(

select *,rid=ROW_NUMBER() over(partition by month(safe_startdate) order by month(safe_startdate))

from dbo.V_B2C_CarHost where Car_Sign like '鲁B%' and Mob_city='青岛市'

and YEAR(safe_startdate)=2009) as aa

where rid<=23

你可能感兴趣的:(查询09年1-12月的车主数据样本)