行级聚合

SELECT a.salesstaff,a.OrderNo,a.OrderDate,a.Amount,
SUM(amount) OVER (PARTITION BY a.SalesStaff)
FROM bdOrder a(NOLOCK)
WHERE a.OrderDate >=’2011-05-01′