It worked!
I just noticed it was missing brackets:
SELECT YourQuery.ID, YourQuery.Amount
FROM YourQuery
INNER JOIN MyQuery ON (YourQuery.ID = MyQuery.ID AND RANK =PaymentMode)
Thanks for your help
Hi,
I have a database which includes A column for Policy ID and a column for Payments. e.g.:
ID Payment
8006 400
8006 300
8006 400
8007 200
8007 100
8007 100
I need to find the mode on Payment column which is the most common amount for each policy. so end result would be
ID Payment...