SyndicaBlockchain Fees per Category
    Updated 2024-12-03
    -- forked from Ecosystems Wallet Count Aggregate @ https://flipsidecrypto.xyz/studio/queries/d9d38293-b03d-4092-9784-9b82ef6ea193

    with

    bsc as (
    SELECT
    value:LABEL_TYPE as label_type
    , value:TRANSACTIONS as transactions
    , value:AVG_GAS_USED_USD as avg_gas_used_usd
    -- , value:MEDIAN_GAS_USED_USD as median_gas_used_usd
    , 'BSC' as chain
    from (
    select live.udf_api('https://flipsidecrypto.xyz/api/v1/queries/bf520a92-439e-4fa8-9c2b-f162e5415100/data/latest'):data AS response
    ) , lateral flatten(input => response)
    ),

    polygon as (
    SELECT
    value:LABEL_TYPE as label_type
    , value:TRANSACTIONS as transactions
    , value:AVG_GAS_USED_USD as avg_gas_used_usd
    -- , value:MEDIAN_GAS_USED_USD as median_gas_used_usd
    , 'polygon' as chain
    from (
    select live.udf_api('https://flipsidecrypto.xyz/api/v1/queries/e7bfaaeb-0e8c-4505-be05-73b0941ddda9/data/latest'):data AS response
    ) , lateral flatten(input => response)
    ),

    base as (
    SELECT
    value:LABEL_TYPE as label_type
    , value:TRANSACTIONS as transactions
    , value:AVG_GAS_USED_USD as avg_gas_used_usd
    -- , value:MEDIAN_GAS_USED_USD as median_gas_used_usd
    , 'base' as chain
    from (
    QueryRunArchived: QueryRun has been archived