|
|
|
|
|
by Svip
2406 days ago
|
|
While counting columns will not include NULL columns, how about counting joined tables? SELECT a.id, COUNT(b.*) FROM a JOIN b ON b.a_id = a.id GROUP BY a.id
is not permitted in Postgres.Sure, I could just use COUNT(b.a_id) since that's what I join on, but a more complicated example might not allow for that. For instance if it was a virtual table. |
|