I have these data from a table. Example, I have table for points named tbl_points.
tbl_points contains :
ptsID, team1, team2.
1 10 20
2 20 10
3 30 5
How do I create a query that will sum up the points for team1 and team2?
The following query:
will give you an one-row table as result:
Also, using name
tbl_pointsis not good. It’s better to use no prefixes. Just name your tablepoints, it will be clear enough.