SocioCryptoXmetrics copy
    Updated 2023-04-20
    -- forked from Xmetrics @ https://flipsidecrypto.xyz/edit/queries/ef6f5300-d6a6-4a4d-b1dd-f301edbbeca2

    SELECT date_trunc('day',block_timestamp) as date,
    count(DISTINCT to_address) as n_recievers,
    sum(n_recievers) OVER (ORDER BY date) as xmetrics_holders,
    sum(raw_amount)/pow(10,18) as total_Xmetrics,
    sum(total_Xmetrics) OVER (ORDER BY date) as cum_xmetrics
    FROM polygon.core.fact_token_transfers
    WHERE from_address = '0x0000000000000000000000000000000000000000'
    AND contract_address = '0x15848c9672e99be386807b9101f83a16eb017bb5'
    AND to_address = lower('{{my_polygon_wallet}}')
    GROUP BY date
    ORDER BY date DESC


    Run a query to Download Data