freemartianWayfinder Deposit & Increase Time
    Updated 3 days 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: 3 days agoAuto-refreshes every 1 hour
    LABEL
    USERS
    $PRIME Amount
    1
    13 Months93244231
    2
    32 Months252396816
    3
    12 Months13072499646
    4
    5 Months3952278669
    5
    3 Months26018370668
    6
    22 Months107698
    7
    25 Months6812801
    8
    16 Months258147
    9
    Less Than 1 Month245471223
    10
    8 Months3221802729
    11
    14 Months4633007
    12
    19 Months275236
    13
    18 Months229985664
    14
    29 Months1875331508
    15
    28 Months1096308508
    16
    24 Months799724580
    17
    4 Months6483508977
    18
    10 Months159772102
    19
    17 Months5354831
    20
    33 Months141222321
    37
    923B
    40s