Query editor
WITH resp AS (SELECT json_parse(http_get('https://d7jmnyp9fu.us-west-2.awsapprunner.com/acp-jobs/statistics')) AS j),daily AS (SELECT CAST(json_extract(j, '$.data.dailyCumulativeSum') AS ARRAY(JSON)) AS arrFROM resp)SELECTCAST(json_extract_scalar(s, '$.date') AS DATE) AS day,TRY_CAST(json_extract_scalar(s, '$.completed') AS BIGINT) AS completed_jobs,TRY_CAST(json_extract_scalar(s, '$.rejected') AS BIGINT) AS rejected_jobs,TRY_CAST(json_extract_scalar(s, '$.failed') AS BIGINT) AS failed_jobs,TRY_CAST(json_extract_scalar(s, '$.total') AS BIGINT) AS total_jobs,TRY_CAST(json_extract_scalar(s, '$.revenue') AS DOUBLE) AS revenue,TRY_CAST(json_extract_scalar(s, '$.cumulativeCompleted') AS BIGINT) AS cumulative_completed_jobs,TRY_CAST(json_extract_scalar(s, '$.cumulativeRejected') AS BIGINT) AS cumulative_rejected_jobs,TRY_CAST(json_extract_scalar(s, '$.cumulativeFailed') AS BIGINT) AS cumulative_failed_jobs,TRY_CAST(json_extract_scalar(s, '$.cumulativeTotal') AS BIGINT) AS cumulative_total_jobs,TRY_CAST(json_extract_scalar(s, '$.cumulativeRevenue') AS DOUBLE) AS total_revenueFROM dailyCROSS JOIN UNNEST(arr) AS t(s)ORDER BY day ASC