Answer the question
In order to leave comments, you need to log in
How to sum rows from the database if the name is the same?
There is a request to mysql to display rows from a table with a rating, where there can be several records for one user.
SELECT name, month, points FROM points WHERE month=? ORDER BY points DESC
Answer the question
In order to leave comments, you need to log in
select `name`, `month`, sum(`points`) from `points` group by `name` = ?, `month` = ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question