I would like to know how is possible to get rows count in result of sql statement with group by. As I know count aggregation counts the result of grouped rows but I would like to know the count of all rows in result but without subselect. Does anybody know how PhpMyAdmin count rows returned by query with grouped rows? I think there is a special command for mysql but dont remember the name.
Asked
Active
Viewed 41 times
0
-
Are you thinking of [GROUP BY WITH ROLLUP](https://dev.mysql.com/doc/refman/8.0/en/group-by-modifiers.html)? – Bill Karwin Oct 05 '18 at 17:47
-
Are you just wanting to count the results returned? https://stackoverflow.com/questions/607264/how-can-i-count-the-numbers-of-rows-that-a-mysql-query-returned – dmikester1 Oct 05 '18 at 17:49
-
1You can use `SQL_CALC_FOUND_ROWS`. Check: https://stackoverflow.com/a/52532959/2469308 – Madhur Bhaiya Oct 05 '18 at 17:58
-
1@MadhurBhaiya It looks like the answer I was looking for. Thaks. – Čamo Oct 05 '18 at 18:20
-
If there are another solutions please write it here. – Čamo Oct 05 '18 at 18:21
-
Possible duplicate of [How can I count the numbers of rows that a mysql query returned?](https://stackoverflow.com/questions/607264/how-can-i-count-the-numbers-of-rows-that-a-mysql-query-returned) – Alex Oct 05 '18 at 18:27