Imho if you write queries you need to use SQL not PQL. What type of audience it would be? I assume batchhttps://developer.adobe.com/experience-platform-apis/references/segmentation/#operation/createAudience Create an audience then wait for next segment job or use flexible audience evaluation