Updated 2022-10-06
    with market as
    (
    SELECT PLATFORM_NAME , count(tx_hash)
    from ethereum.core.ez_nft_sales
    where BLOCK_TIMESTAMP > CURRENT_DATE -360
    GROUP by 1
    order by 2 DESC
    limit 5
    )

    SELECT BLOCK_TIMESTAMP::date as daily ,EVENT_TYPE , A.PLATFORM_NAME , 100*sum(PLATFORM_FEE_USD)/sum(PRICE_USD) as percent
    from ethereum.core.ez_nft_sales A , market B
    where BLOCK_TIMESTAMP > CURRENT_DATE -30
    and A.PLATFORM_NAME = B.PLATFORM_NAME
    and CURRENCY_SYMBOL ilike '%ETH%'
    GROUP by 1 , 2 ,3

    Run a query to Download Data