I am trying to get a simple count of rows in three different MySQL tables with a single query. Here is what I have:
SELECT count(s.`id`) AS c1,
count(g.`id`) AS c2,
count(r.`id`) AS c3
FROM table1 s,
table2 g,
table3 r
This does not work though, I think its multiplying all three totals instead. Thanks for the help.
If tables have no relationship an cannot be joined, try this: