Yousefi_1994World Cup Round of 32 - Solana USDC Usage Patterns top 10
    Updated 2023-04-20
    -------------------------------Parameters-------------------------------

    with fix_parameter as (
    select
    case
    when '{{Days}}' = 'All time' then 2000
    when '{{Days}}' = 'Last 30 days' then 30
    when '{{Days}}' = 'Last 60 days' then 60
    when '{{Days}}' = 'Last 90 days' then 90
    when '{{Days}}' = 'Last 180 days' then 180
    when '{{Days}}' = 'Last 360 days' then 360
    else 30
    end as time_frame
    ),
    solana_usdc_transfers as (
    select
    block_timestamp,
    tx_id as tx_hash,
    block_id as block_number,
    tx_from as sender,
    tx_to as receiver,
    amount::float as transfer_amount,
    'Solana' as chain
    from solana.core.fact_transfers, fix_parameter
    where mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    and amount::float > 0
    and block_timestamp >= current_date - time_frame
    )

    select
    receiver as "Receiver",
    sum(transfer_amount) as "Amount of USDC transferred"
    from solana_usdc_transfers
    group by "Receiver"
    order by "Amount of USDC transferred" desc limit 10
    Run a query to Download Data