Answer the question
In order to leave comments, you need to log in
How to write a SQL query?
There is a peoples table with fields id, name. There is a second table peoples_statistic with fields people_id, gain, date.
Example peoples:
1 Sam
2 Jake
Example peoples_statistic:
1 Sam 25 2019-05-05
1 Sam 30 2019-06-06
1 Sam 10 2019-07-07
2 Jake 20 2019-02-01
To return a table with fields id, name , gain(to sum everything for one person):
1 Sam 65
2 Jake 20
Thanks for the help!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question