Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
-- This query exports all agent builder usage.

SELECT
abu.*,
t.display_name AS workspace_name,
o.display_name AS organization_name
abu.*
FROM agent_builder_usage abu
JOIN tenants t ON abu.tenant_id = t.id
JOIN organizations o ON t.organization_id = o.id
ORDER BY abu.from_timestamp DESC;
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ backfill_txns AS (
SELECT
bt.*,
t.organization_id,
t.display_name AS workspace_name,
o.display_name AS organization_name,
:'customer_id' AS customer_id,
:'customer_name' AS customer_name
FROM backfill_txns bt
JOIN tenants t ON bt.tenant_id = t.id
JOIN organizations o ON o.id = t.organization_id
ORDER BY bt.received_at DESC;
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ WITH backfilled_txns AS (
backfilled_at
)
SELECT
bt.*,
t.display_name AS workspace_name,
o.display_name AS organization_name
bt.*
FROM backfilled_txns bt
JOIN tenants t ON bt.tenant_id = t.id
JOIN organizations o ON o.id = t.organization_id
ORDER BY bt.received_at DESC;
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ SELECT
rm.self_hosted_customer_id,
rm.backfill_id,
rm.backfilled_at,
t.organization_id,
t.display_name AS workspace_name,
o.display_name AS organization_name
t.organization_id
FROM remote_metrics rm
JOIN tenants t ON rm.tenant_id = t.id
JOIN organizations o ON t.organization_id = o.id
ORDER BY rm.received_at DESC;
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ backfill_txns AS (
)
SELECT
bt.*,
t.display_name AS workspace_name,
o.display_name AS organization_name,
:'customer_id' AS customer_id,
:'customer_name' AS customer_name
FROM backfill_txns bt
JOIN tenants t ON bt.tenant_id = t.id
JOIN organizations o ON bt.organization_id = o.id
ORDER BY bt.created_at DESC;
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ WITH backfilled_txns AS (
RETURNING *
)
SELECT
bt.*,
t.display_name AS workspace_name,
o.display_name AS organization_name
bt.*
FROM backfilled_txns bt
JOIN tenants t ON bt.tenant_id = t.id
JOIN organizations o ON bt.organization_id = o.id
ORDER BY bt.created_at DESC;
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
-- This query exports all trace count transactions.

SELECT
tc.*,
t.display_name AS workspace_name,
o.display_name AS organization_name
tc.*
FROM trace_count_transactions tc
JOIN tenants t ON tc.tenant_id = t.id
JOIN organizations o ON t.organization_id = o.id
ORDER BY tc.created_at DESC;
Loading