My question is how can I subtract one from the CB Query Field?
You want to count active users without the owner? I suggest the below query as it only counts active users (excludes owner, pending, and banned).
Code:
SELECT COUNT(*) FROM `#__groupjive_users` WHERE `status` IN ( 1, 2, 3 )
To include the Owner use the below.
Code:
SELECT COUNT(*) FROM `#__groupjive_users` WHERE `status` IN ( 1, 2, 3, 4 )
To count for a specific group use the below.
Code:
SELECT COUNT(*) FROM `#__groupjive_users` WHERE `group_id` = GROUP_ID_HERE AND `status` IN ( 1, 2, 3 )
I want to do the following too:
If CB Query Field is equal or greater than 12 display a message
It depends entirely where you intend on using this at. If the locations supports substitutions you could try the below.
[cb:if cb_queryfield>"12"]There are more than 12 users.[/cb:if]