[eluser]webnology[/eluser]
Hi all,
I have a customers tabel and a revenue table. I would like to retrieve my top selling customers, so the ones with the highest sum of revenue in the revenues tables. I hav 2 fields per row for defining this revenue.
So ,it's like:
Revenue_id - rev_1 - rev_2
1 100€ 150€
2 50€ 65€
...
Can someone help me how to make a query selecting the top revenue rows where the sum of rev_1 and rev_2 adds up, joining this with the customers table.
Any help or direction very appreciated,
Michel