Hello i am have 3 tables:
- players (id, name, surname)
- games (id, id_gamer, points)
- totals (id, id_gamer, name_gamer, total_Points, position)
In tables: players
and games
, records input by administrator,
in table totals
I want through sql query input information about on each player (id_gamer and name_gamer), and count of points (sum (points)) and position in the rating
I start to do this but it doesn't work
INSERT INTO totals (id_gamer, name_gamer) SELECT id, Name FROM players ;
thanks