I have two table table1 and table2
table1:
id amount
1 394
2 897
2 345
3 123
table2:
id amount
2 876
3 890
3 876
4 908
I need to generate table3. join two table and SUM id wise and show top 30 amount holder.
table3:
id amount
2 2118
3 1889
4 908
1 394
You can get data in followng way:
If you want to create table with above data, you can do like this: