SQL count results from group by
Posted: Wed Aug 22, 2012 3:18 pm
Hi,
I would like to know the total rows returned by a "Group by"-query.
I could use count() but together with GROUP BY, it gives the subtotals for each group.
And that is not what i want.
I would like to know the total rows returned by a "Group by"-query.
Code: Select all
SELECT table1.id, table2.name,table3.name FROM table1, table2, table3
WHERE (associate table1, table2 and table3 to each other)
GROUP BY table1.id
And that is not what i want.