Answer the question
In order to leave comments, you need to log in
Sampling with grouping and sum?
There is a query sketch:
SELECT * FROM `stat` GROUP BY `geo` ORDER BY `good` DESC
(`geo`)
- 100 (общее количество `good` по гео 'RU')
Answer the question
In order to leave comments, you need to log in
SELECT `geo`, sum(`good`) as `sum_good` FROM `stat` GROUP BY `geo` ORDER BY `sum_good` DESC
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question