I have two tables.
- First table have columns: price, code_one
- Second table has: code_one, code_two
Both tables could be joined using code_one table.
How to have “Sum of prices grouped by code_two” ?
I tried:
Select sum(price) from table1 Group By (select a.code_two from table2 a, table1 b where a.code_one = b.code_one)
1 Answer