I have two SQL queries for counting the rows from the table tContentNode, depending on the type 2 or 3.
Query 1:
SELECT count(*) _countA FROM TCONTENTNODE WHERE type = '2'
AND parentid ='02b3abc2-4983-485a-ab09-1a8cb328b9b5';
Query 2:
SELECT count(*) _countB FROM TCONTENTNODE WHERE type = '3'
AND parentid ='02b3abc2-4983-485a-ab09-1a8cb328b9b5';
Now I want to get the values of _countA and _countB using only one query. How can I get the counts using one query. Is there any way to do that. I am using SQLite Database.
EDIT:
I want values of _countA and _countB separately, not both together(Not using IN).
Try to use
group byfor two variables: