i_danBase: 24hr Price Change
    Updated 2025-02-16
    With latest_prices AS (
    SELECT
    symbol
    , token_address
    , name
    , price
    , hour
    FROM base.price.ez_prices_hourly
    WHERE hour = (SELECT MAX(hour)-- - INTERVAL '1 HOUR'
    FROM base.price.ez_prices_hourly
    )
    ),

    last_24hr_price AS (
    SELECT
    p.symbol
    , p.token_address
    , p.name
    , p.price
    , MAX(p.hour)
    FROM base.price.ez_prices_hourly p
    JOIN latest_prices l
    ON p.token_address = l.token_address
    WHERE p.hour = l.hour - INTERVAL '24 HOURS'
    GROUP BY 1, 2, 3, 4
    ORDER BY p.token_address DESC
    )

    SELECT
    l.symbol AS "Token"
    , ROUND((l.price - p.price)/p.price * 100, 2) AS "Price Change"
    , CASE WHEN "Price Change" > 0 THEN '🟢' ELSE '🔴' END AS "Change"
    , l.token_address AS "Address"
    FROM latest_prices l
    JOIN last_24hr_price p
    ON l.token_address = p.token_address
    Last run: about 2 months ago
    Token
    Price Change
    Change
    Address
    1
    SOFI154.97🟢0x703d57164ca270b0b330a87fd159cfef1490c0a5
    2
    OSP84🟢0xacb5b33ce55ba7729e38b2b59677e71c0112f0d9
    3
    NULL67.46🟢0x0a14ef61afb32e5ca672e021784f71705ac14908
    4
    53.91🟢0x00000000000007c8612ba63df8ddefd9e6077c97
    5
    SPORT46.16🟢0x220c6019203aaa7f14b5cd44a323446019609798
    6
    BLEP43.32🟢0xc438b0c0e80a8fa1b36898d1b36a3fc2ec371c54
    7
    NUT36.72🟢0x6a9431b9ecce9dde3f7a32391d5b61c5ad11e4a0
    8
    CHOMP35.1🟢0xebff2db643cf955247339c8c6bcd8406308ca437
    9
    OPSYS32.77🟢0x38b88d6568d61556d33592ad7bc24e89a7fb6691
    10
    DEFAI32.26🟢0xb3621cd34803cf7065dcb0d5bfb0f56c1834a063
    11
    KIBSHI30.49🟢0xc7dcca0a3e69bd762c8db257f868f76be36c8514
    12
    MRSMIGGLES26.81🟢0x31b28012f61fc3600e1c076bafc9fd997fb2da90
    13
    TONY26.64🟢0xb22a793a81ff5b6ad37f40d5fe1e0ac4184d52f3
    14
    WLIBRA24.49🟢0x01edbffa4f61404458e22ff45deffef1c62228b5
    15
    RIKY23.75🟢0x729031b3995538ddf6b6bce6e68d5d6fdeb3ccb5
    16
    MEED21.71🟢0xd9df947d2a8f9c28c37af7cb7c526022fb14efa2
    17
    QVRS21.07🟢0x45f368693eee8e3610270f82085784c1c8ac124b
    18
    GEKO20.28🟢0x64baa63f3eedf9661f736d8e4d42c6f8aa0cda71
    19
    DOGINME20.17🟢0x6921b130d297cc43754afba22e5eac0fbf8db75b
    20
    BANDIT18.25🟢0xe0f96f025ebb27950718ebd787b69c325cf045c0
    40
    3KB
    5s