I have this odd case where I’d like to display all list values with i.e. counter
My test table content
name, misc
A, blah
B, 123
A, asd
now, this query will fetch results just for A and B, but how can I display C “results”
select name, count(*) from table
where name in ('A','B','C')
result I’d like to get
A 2
B 1
C 0
this case is driving me mad for a day already.
please help
Cheers,
Dan
I think you’ll have to use an outer join for this type of query, such as:
You could use a table object instead of a UNION ALL: