The problem isn't the conversion from old syntax to join syntax, but that you are missing a group by.
Also I don't think that you can get a running total with a.ID = B.ID I think you need to a.ID >= b.ID (in order to sum all records up to the current one)
adam_k
Practically a Posting Shark
803 posts since Jun 2011
Reputation Points: 256
Solved Threads: 149
Change your group by to
GROUP BY a.ID, a.Sale - (a.Rate - 5) * (a.Weight * 20)
(Column Profit is a calculation not an aggregate).
Also, is there an error?
adam_k
Practically a Posting Shark
803 posts since Jun 2011
Reputation Points: 256
Solved Threads: 149