---
title: "WQL query, ChatGPT: the full transcript — Kiweely"
description: "Every turn of ChatGPT on the wql query task in Kiweely’s Workday tenant test, word for word with its times."
url: https://kiweely.com/tenant-test/transcripts/t6-cg
---

# T6 · CG · ChatGPT: OpenAI GPT-6.2 Astra (reasoning high) via Codex CLI

## Turn 1: prompt (sent 2026-11-20T04:49:35.143Z)

Write me a WQL query I can run against our Workday tenant (through Workday’s WQL REST API) that returns, for each supervisory organization, the number of active employees hired on or after 1 January 2025, with the largest count first. Organizations with none can be left out.

## Turn 1: answer (2026-11-20T04:50:02.476Z, 27.3 s)

I’ll check Workday’s WQL syntax and which field names you may need to confirm in your tenant.

sql

```
SELECT supervisoryOrganization, COUNT()
FROM allActiveEmployees
WHERE hireDate >= '2025-01-01'
GROUP BY supervisoryOrganization
ORDER BY COUNT() DESC
```

Pass this statement as the URL-encoded `query` parameter to the WQL `GET /data` endpoint. It counts currently active employees under their current supervisory organization, includes hires on January 1, 2025, and returns only organizations with at least one match, largest count first. [Workday WQL syntax](https://doc.workday.com/workday-education/en-us/course-manuals/workday-extend-for-developers/relationships-between-business-objects.html?toc=3) · [Workday REST request example](https://developer.workday.com/documentation/GUID-dfa9b242-e0e6-4235-a0a8-f3cb64736586-enHYPHENus/ReferenceBatchProtocolRESTAPI)
