Ali3NTVL / Market Cap / Price Correlation Over Time
    Updated 2025-03-18
    with pricet as (
    select date_trunc ({{Date_Trunc}},hour) as date2,
    median (price) as XSGDPrice
    from avalanche.price.ez_prices_hourly
    where token_address = '0xb2f85b7ab3c2b6f62df06de6ae7d09c010a5096e'
    and price > 0
    group by 1
    order by 1 desc),

    mintst as (
    select date_trunc ({{Date_Trunc}},block_timestamp) as date1,
    sum (amount) as Minted_Volume
    from avalanche.core.ez_token_transfers
    where contract_address = lower ('0xb2f85b7ab3c2b6f62df06de6ae7d09c010a5096e')
    and from_address = '0x0000000000000000000000000000000000000000'
    group by 1),

    burnst as (
    select date_trunc ({{Date_Trunc}},block_timestamp) as date1,
    sum (amount) as Burned_Volume
    from avalanche.core.ez_token_transfers
    where contract_address = lower ('0xb2f85b7ab3c2b6f62df06de6ae7d09c010a5096e')
    and to_address = '0x0000000000000000000000000000000000000000'
    group by 1),

    maintable as (
    select coalesce (date_trunc ({{Date_Trunc}},t1.date1),date_trunc ({{Date_Trunc}},t2.date1)) as date,
    coalesce (Minted_Volume,0) as MintedXSGD,
    coalesce (Burned_Volume,0)*-1 as BurnedXSGD,
    coalesce (MintedXSGD,0) + coalesce (BurnedXSGD,0) AS Net_Volume,
    sum (MintedXSGD) over (order by date asc) as Total_MintedXSGD,
    sum (BurnedXSGD) over (order by date asc)*-1 as Total_BurnedXSGD,
    sum (net_volume) over (order by date asc) as TVL
    from burnst t1 full outer join mintst t2 on t1.date1 = t2.date1
    order by 1 desc),

    Last run: about 1 month ago
    DATE
    TVL
    MARKET_CAP
    XSGD_PRICE
    1
    2025-02-17 00:00:00.0005424049.674050021.27152110.7460969583
    2
    2025-02-10 00:00:00.0007424049.675500734.530216620.73872
    3
    2025-02-03 00:00:00.0008924049.676596367.484449720.73275375
    4
    2025-01-20 00:00:00.00010224049.677551580.214733870.7331914167
    5
    2025-01-13 00:00:00.00015224049.6711131695.71428180.7276433333
    6
    2025-01-06 00:00:00.00011524049.678420738.33436570.7329940833
    7
    2024-12-30 00:00:00.00011024049.678065575.068285610.73527
    8
    2024-12-09 00:00:00.00010724049.677978918.159523070.7457177917
    9
    2024-11-11 00:00:00.00038439702867196.0811650.7532720833
    10
    2024-11-04 00:00:00.00036439702754367.60390.7578485833
    11
    2024-10-21 00:00:00.00016439701245158.4957150.761141375
    12
    2024-10-14 00:00:00.00015239701161627.0828750.7648583333
    13
    2024-10-07 00:00:00.00019239701473174.209150.76675575
    14
    2024-09-30 00:00:00.00018739701447110.5545050.7799484583
    15
    2024-09-23 00:00:00.00016077641252319.534880.7748255
    16
    2024-09-16 00:00:00.00015500001198955.2250.77153025
    17
    2024-09-02 00:00:00.000850000651551.350.76571375
    18
    2024-08-12 00:00:00.0005000037883.60.7543867917
    19
    2024-07-08 00:00:00.0005000537165.59118750.7397922917
    19
    1KB
    18s