I have the following data:
id | home_team | away_team | home_goals | away_goals
------------------------------------------------------------------
1 | 1 | 2 | 5 | 2
2 | 2 | 1 | 3 | 0
I'm trying to build a query so i would get the following result
team | average goals
-----------------------------------
1 | 2.5
2 | 2.5
I allready tried a union inside a aggregate function but that doesn't work. (not allowed?) Sombody has a hint for me?





Bookmarks