Created
December 23, 2025 04:29
-
-
Save apoliakov/9aa6693d7e1cf030ca9527b40061c416 to your computer and use it in GitHub Desktop.
Counting DBOS Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WITH daily_workflows AS ( | |
| SELECT | |
| DATE_TRUNC('day', TO_TIMESTAMP(created_at / 1000)) AS day, | |
| workflow_uuid | |
| FROM dbos.workflow_status | |
| ) | |
| SELECT | |
| dw.day, | |
| COUNT(DISTINCT dw.workflow_uuid) AS workflow_count, | |
| COUNT(oo.workflow_uuid) AS step_count, | |
| COUNT(DISTINCT dw.workflow_uuid) + COUNT(oo.workflow_uuid) AS total_actions | |
| FROM daily_workflows dw | |
| LEFT JOIN dbos.operation_outputs oo ON dw.workflow_uuid = oo.workflow_uuid | |
| GROUP BY dw.day | |
| ORDER BY dw.day DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment