StangFASTsupply AAVE cop
    Updated 2023-06-05
    -- forked from supply AAVE @ https://flipsidecrypto.xyz/edit/queries/0e4fd4cf-dc09-4acb-b599-2b862bb85f6c

    -- forked from AAVE Holder @ https://flipsidecrypto.xyz/edit/queries/fa0d6b1c-47b2-4009-9a13-09228367a294

    -- forked from 03 total supply @ https://flipsidecrypto.xyz/edit/queries/410b24ae-272c-47e3-a324-1e8f478d389b

    -- forked from 03 cm staked @ https://flipsidecrypto.xyz/edit/queries/a57e5e3f-e67b-4d00-86b0-819c0c03c101

    -- forked from 02 AAVE staking @ https://flipsidecrypto.xyz/edit/queries/a82921a3-4340-45e8-91e4-f8f651ec31af

    -- 0x0000000000000000000000000000000000000000 [ supply ]
    -- 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9 [ AAVE ]
    -- 0x4da27a545c0c5B758a6BA100e3a049001de870f5 [ stkAAVE ]
    -- 0x25F2226B597E8F9514B3F68F00f494cF4f286491 [ Aave: Ecosystem Reserve ]
    -- 0xd784927Ff2f95ba542BfC824c8a8a98F3495f6b5 [ Aave: Incentives Controller ]
    -- 0xf6866aaeb54042418410d1333cb489f3650dde5b [ LP ]
    -- forked from 01 token @ https://flipsidecrypto.xyz/edit/queries/2e144f2d-9f68-4f98-a95f-ab178eeab04e
    with

    token_price AS
    (
    SELECT
    date_trunc( 'day' , a.hour ) AS day
    , avg( a.price ) AS price
    , a.symbol AS token
    , a.token_address AS address
    , a.decimals AS decimals
    FROM
    ethereum.core.fact_hourly_token_prices a
    GROUP BY
    1 , 3 , 4 , 5
    ORDER BY
    1 DESC
    )
    ,
    aave_price AS