I wish to create a query where I do a number of counts on the same table but
with different filters.
ie:
count(id) as numrows
count(id) as inrows where direction = 'In'
count(id) as outrows where direction = 'Out'
Could I do the above in a single query?
| id | date | direction |
select count(id), numrows as type from table
union
select count(id), inrows as type from table where direction = 'In'
union
select count(id) as id, outrows as type from table where direction = 'Out'
This could be?
I am sorry that i can't try here, because i am not in my work or my home,
and