freemartianWayfinder Deposit & Increase Time
    Updated 2 hours 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,
    to_timestamp(decoded_log:createdTimestamp) AS createdTimestamp,
    to_timestamp(decoded_log:endTimestamp) AS endTimestamp,
    DATEDIFF(DAY, createdTimestamp, endTimestamp) AS difference_in_days,
    decoded_log:depositIndex AS depositIndex,
    decoded_log
    FROM ethereum.core.ez_decoded_event_logs
    WHERE contract_address = '0x4a3826bd2e8a31956ad0397a49efde5e0d825238'
    AND event_name = 'DepositCreated'
    AND block_timestamp::date >= '2024-06-01'

    ),

    addtime AS (
    SELECT
    block_timestamp,
    tx_hash,
    decoded_log:user AS user,
    -- decoded_log:amount / pow(10,18) AS amount,
    to_timestamp(decoded_log:createdTimestamp) AS createdTimestamp,
    to_timestamp(decoded_log:endTimestamp) AS newTimestamp,
    Last run: about 2 hours agoAuto-refreshes every 1 hour
    LABEL
    USERS
    $PRIME Amount
    1
    13 Months91244062
    2
    Less Than 1 Month243470847
    3
    12 Months12912402370
    4
    5 Months3902281571
    5
    32 Months248294366
    6
    27 Months35121248402
    7
    31 Months1642243597
    8
    35 Months249820401
    9
    7 Months5122426415
    10
    30 Months1133712862
    11
    23 Months228150749
    12
    18 Months224983422
    13
    19 Months275236
    14
    9 Months2841909197
    15
    26 Months3047262351
    16
    36 Months21259729608
    17
    2 Months9914745825
    18
    34 Months92156083
    19
    21 Months151162
    20
    15 Months289656
    37
    922B
    125s