sql 语句取分组后的条件数据
取分组后的按时间排序的前两条数据
Select 字段1,...,字段n
From (Select *,(Select Count(*)
From 订单表 as a
Where a.客户ID = 订单表.客户ID
And a.订单日期> =订单表.订单日期) as 序号
From 订单表 ) as b
Where 序号 <=2