MrftiUntitled Query
    Updated 2022-07-22
    WITH tbl1 AS(
    SELECT SUM(price) AS DapperUtilityCoin , date_trunc( day , block_timestamp) as date
    from flow.core.fact_nft_sales full join flow.core.fact_prices on currency=token_contract
    WHERE currency= 'A.ead892083b3e2c6c.DapperUtilityCoin'
    and date >= '2022-04-20'
    group by date
    order by date ASC
    ),
    tbl2 AS (
    SELECT SUM(price) AS FlowToken , avg(price), date_trunc( day , block_timestamp) as date1
    from flow.core.fact_nft_sales
    WHERE currency= 'A.1654653399040a61.FlowToken'
    and date1 >= '2022-04-20'
    group by date1
    order by date1 ASC
    )
    SELECT *
    FROM tbl1
    FULL JOIN tbl2
    ON date=date1
    ORDER BY date asc

    Run a query to Download Data