devops – GraphQL Query For Cloudflare SQL query
Any Cloudflare and GraphQL Expert here??
Struggling with converting below SQL query into GraphQL, any help would be appreciated.
SELECT m.month_end_date as month_end_date
--Account Details
, c.account_pubname as account_name
, m.user_id as account_id
, z.zone_name as zone_name
, z.zone_plan as zone_rate_plan
--Requests
, sum(m.cached_request_count) as monthly_cached_requests
, sum(m.request_count) - sum(m.cached_request_count) as monthly_uncached_requests
, sum(m.request_count) as monthly_requests
--Data Transfer
, sum(m.transferred_bytes)/1e9 as monthly_data_transfer_gb
FROM `cloudflare-bi.ida.requests_monthly` m
JOIN `cloudflare-bi.ida_base.customer` c ON m.user_id = c.account_id
JOIN `cloudflare-bi.ida.zone` z ON m.zoneid = z.zone_id
#Enter Date below in format: 'Year-Month-Day'
WHERE month_end_date between '2023-01-01' AND '2023-07-31'
AND zone_plan = 'XYZ'
#Enter Account ID(s) below
AND m.user_id IN (
123123, 321321
)
group by 1,2,3,4,5;
Expecting GraphQL of this SQL
Read more here: Source link
