Sbhn_NPPolygon Withdraw User AAVE
    Updated 2022-08-10
    SELECT
    CASE WHEN address_name is null THEN a.symbol ELSE address_name END as token,
    sum(withdrawn_usd) as volume_usd,
    count(*) as events
    FROM flipside_prod_db.aave.withdraws a
    left outer JOIN polygon.core.dim_labels b
    ON b.address = a.symbol
    WHERE depositor_address LIKE lower('{{User}}')
    and token is not null
    GROUP BY 1
    ORDER BY 2 DESC
    LIMIT 10
    Run a query to Download Data