I'm trying to perform an sql query, but I get an error that unfortunately, doesn't tell me much. I haven't done databases in a while, maybe it will be more obvious to you!

I've got 2 tables: One for Clients, one for payments. I'm trying to get the total amount of money owed for each Client that has authorized prepayments (via void cheque or whatever), ignoring those that prefer to pay with cash or cheque.

Code:
  
SELECT PAYMENT.num, SUM(PAYMENT.AMOUNT) As Total, PAYMENT.Client, PAYMENT.acct
FROM PAYMENT 
GROUP BY PAYMENT.num
INNER JOIN  
ON PAYMENT.num = Client.NUM
WHERE PAYMENT.AMOUNT > 0 AND Client.Prepay = 'Yes';
The reason for the inner join is that I need to cross-reference the client to know if he's authorized prepay.

I get this error: Syntax error (missing operator) in expression: PAYMENT.num INNER JOIN
ON PAYMENT.num = Client.NUM
WHERE PAYMENT.AMOUNT > 0 AND Client.Prepay = 'Yes';

Any SQL wizards in the house? I'm at a loss here...