CartanGroupBC Effective Royalty Rate
    Updated 2023-12-07
    SELECT all_days,
    project_name,
    avg(err) over (partition by project_name order by all_days rows between 7 preceding and current row) as err
    FROM (

    select
    date_trunc('day',block_timestamp) as all_days,
    project_name,
    sum(creator_fee_usd)/sum(price_usd) as err
    from ethereum.nft.ez_nft_sales
    where nft_address in (
    '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d',
    '0x60e4d786628fea6478f785a6d7e704777c86a7c6',
    '0xed5af388653567af2f388e6224dc7c4b3241c544',
    '0xbd3531da5cf5857e7cfaa92426877b022e612cf8',
    '0x5af0d9827e0c53e4799bb226655a1de152a425a5',
    '0x8821bee2ba0df28761afff119d66390d594cd280',
    '0x769272677fab02575e84945f03eca517acc544cc',
    '0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb'
    )
    and currency_symbol in ('ETH','WETH')
    and price_usd > 0
    group by 1,2
    )a
    order by 1 desc

    Run a query to Download Data