SandeshOSMOSIS usdc
    Updated 2022-11-22
    with osmosis_usdc as
    (
    select
    block_id as block_id,
    date_trunc('{{granularity}}',block_timestamp) as time,
    tx_id as tx_hash,
    SENDER as sender,
    RECEIVER as receiver,
    'USDC' as currency,
    amount/pow(10,6) as usd_amount,
    case
    when usd_amount < 1 and usd_amount > 0 then 'shrimp (0-1)'
    when usd_amount < 10 and usd_amount >= 1 then 'crab (1-10)'
    when usd_amount < 50 and usd_amount >= 10 then 'Octpus (10-50)'
    when usd_amount < 100 and usd_amount >= 50 then 'Fish (50-100)'
    when usd_amount < 500 and usd_amount >= 100 then 'Dolphins (100-500)'
    when usd_amount < 1000 and usd_amount >= 500 then ' Shark (500-1000)'
    when usd_amount < 5000 and usd_amount >= 1000 then ' Whale (1000-5000)'
    when usd_amount >= 5000 then 'Humpback whale (5000+)'
    else 'holder'
    end as tx_type
    from osmosis.core.fact_transfers
    where 1=1
    and currency in ('uusdc','ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858')
    and time between '{{start_date}}' and '{{end_date}}'
    )
    select * from osmosis_usdc
    limit 1
    Run a query to Download Data