The goal is to get the number of users in one table who have:
- field EXPIREDATE> CURRENT_TIMESTAMP as nUsersActive
- field EXPIREDATE <CURRENT_TIMESTAMP as nUsersExpired
- field EXPIREDATE NULL as nUsersPreregistered
all with one query, and the result should be, for example,
nUsersActive nUsersExpired nUsersPreregistered 10 2 15
it will be later json_encoded and passed to ExtJS script for display.
Any hint? I tried several times without succeeding. I tried using the UNION operator, I get the correct numbers, but, of course, in the column, while I need them in the line.
Thanks for your support.
source share