Hurling Score Table

Hi, I have an app to display Fixtures and Results for Hurling Matches. I am struggling with table which called Score Table. It has the results belongs each team.
I have two tables first has the results and the other one should has the all results belongs team such as how many matches played , total goal and total points etc. I need to get those data from the fist table. But first table has two colums Home Team and Away Team. Example Home Team is ‘’ X Team ‘’ and I can get the score but X Team also can be Away team and away team score is another column. I should be able to get the score belongs X Team when it is home team and away team to display Score Table.

So you plan to use relations and rollups in your results table to get all the numbers?