ZOQL Aggregate functions - query help
I need export all customers that DO NOT have at lease one active subscription with a term end date in the future. I need to do this in a Workflow at the Rate Plan Charge level. So pull all rate plan charges for all subscriptions for all customers that DO NOT have at least one active subscription with a future term end date.
So if a customer has at least one active subscription with a term end date in the future, exclude them. If a customer DOES NOT have at least one active subscription with a term end date in the future, include them (but I must pull it at the rate plan charge level for additional filtering).
Any help with this would be much appreciated. The Zuora documentation on ZOQL aggregate functions is not sufficient to help work through this. Also, please note I'm not looking for all customers who have canceled subscriptions or all customers who have an inactive subscription but all customers who DO NOT have an active subscription. Thank you.