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′
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′