freemartianWayfinder $USD Category
    Updated 1 hour ago
    WITH prices AS(
    SELECT
    hour::date AS price_day,
    AVG(price) AS price
    FROM ethereum.price.ez_prices_hourly
    WHERE token_address = '0xb23d80f5fefcddaa212212f028021b41ded428cf'
    AND hour::date >= '2024-06-01'
    GROUP BY 1
    ),

    deposits AS (
    SELECT
    block_timestamp,
    tx_hash,
    decoded_log:user AS user,
    decoded_log:amount / pow(10,18) AS amount,
    price * (decoded_log:amount / pow(10,18)) AS amount_usd,
    'Deposit' AS label
    FROM ethereum.core.ez_decoded_event_logs
    INNER JOIN prices ON (block_timestamp::date = price_day)

    WHERE contract_address = '0x4a3826bd2e8a31956ad0397a49efde5e0d825238'
    AND event_name = 'DepositCreated'
    AND block_timestamp::date >= '2024-06-01'

    ),

    withdraws AS (
    SELECT
    block_timestamp,
    tx_hash,
    decoded_log:user AS user,
    decoded_log:totalAmount / pow(10,18) AS amount,
    price * (decoded_log:totalAmount / pow(10,18)) AS amount_usd,
    'Withdraw' AS label
    Last run: about 1 hour agoAuto-refreshes every 1 hour
    CATEGORY
    USERS
    USD_AMOUNT
    1
    Between 5K & 10K $USD5543954210.50666667
    2
    Between 100 & 500 $َUSD1582413178.242746304
    3
    Between 10K & 10K $USD94121321367.0985025
    4
    More Than 50K $USD667369770405.993451
    5
    Less Than 100 $USD6439127984.6852475
    6
    Between 500 & 1K $USD906669000.91875
    7
    Between 1K & 5K $USD18184298783.80140534
    7
    324B
    31s