Simple table
________________________________________________
| id | parent_id | name | some_condition_field |
------------------------------------------------
I want rowset:
________________________________________________________________________________
| id | name | count_childs_with_condition_one | count_childs_with_condition_two |
---------------------------------------------------------------------------------
It is possible? Variables, UNION’s etc..???
Here is a cross-platform solution:
For a single parent:
For all parents:
For MySQL, you could also use this syntax: