For a statistics application, with a table structure as such:
unique_id | browser_family | os | date_time | js_enabled | flash_enabled | non_binary_field
1 firefox w7 ... 1 0 yes
2 chrome w7 ... 1 1 no
3 ie9 wx ... 0 0 yes
So, I’d like to perform a query with where clauses on any fields, and have it give me counts of js_enabled=1, flash_enabled =0, non_binary_field = ‘yes’ for those criteria (say `os` = ‘w7′ and date(`date_time`) = ’01-08-2012’).
The result would be:
count(js_enabled=1) | count(flash_enabled=1) | count(non_binary_field='yes')
2 1 1
Is this possible in a single query?
Thanks!
1 Answer