kaibladeUSDC usage patterns based on Hour
    Updated 2022-11-21
    WITH algo_usdc_data AS
    (SELECT *
    FROM algorand.core.ez_transfer
    WHERE asset_name = 'USDC'
    AND block_timestamp::date >= CURRENT_DATE() - INTERVAL '2 months'),
    algo_hourly AS
    (SELECT DATE_TRUNC ('days', block_timestamp) AS "Days",
    COUNT(tx_id) AS "Transfer Volume"
    FROM algo_usdc_data
    GROUP BY "Days"),

    flow_usdc_data AS
    (SELECT tx_id, block_timestamp, event_data:amount AS amount, event_data:from AS sender
    FROM flow.core.fact_events
    WHERE event_contract = 'A.b19436aae4d94622.FiatToken'
    AND event_type = 'TokensWithdrawn'
    AND block_timestamp::date >= CURRENT_DATE() - INTERVAL '2 months'
    AND tx_succeeded = 'TRUE'),

    flow_hourly AS
    (SELECT DATE_TRUNC ('days', block_timestamp) AS "Days",
    COUNT(tx_id) AS "Transfer Volume"
    FROM flow_usdc_data
    GROUP BY "Days"),

    sol_usdc_data AS
    (SELECT *
    FROM solana.core.fact_transfers
    WHERE mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    AND block_timestamp::date >= CURRENT_DATE() - INTERVAL '2 months'
    ),

    sol_hourly AS
    (SELECT DATE_TRUNC ('days', block_timestamp) AS "Days",
    COUNT(tx_id) AS "Transfer Volume"
    Run a query to Download Data