Mrftiper team period
    Updated 2022-07-11
    With tbl1 AS (
    SELECT sum(price) AS Heat_Sale , date_trunc(day , block_timestamp) AS date1
    FROM
    (
    SELECT *
    FROM flow.core.fact_nft_sales s
    JOIN flow.core.dim_topshot_metadata m
    ON s.nft_id = m.nft_id
    )
    WHERE team = 'Miami Heat'
    AND date1 BETWEEN '2022-05-17' AND '2022-05-29'
    group by date1

    ),
    tbl2 AS(
    SELECT sum (price) AS Celtics_Conference_Sale, date_trunc(day ,block_timestamp) AS date2
    FROM
    (
    SELECT *
    FROM flow.core.fact_nft_sales s
    JOIN flow.core.dim_topshot_metadata m
    ON s.nft_id = m.nft_id
    )
    WHERE team = 'Boston Celtics'
    AND date2 BETWEEN '2022-05-17' AND '2022-05-29'
    group by date2

    ),
    tbl3 AS (
    SELECT sum (price) AS Warriors_Conference_Sale , date_trunc(day,block_timestamp) AS date3

    FROM
    (
    SELECT *
    FROM flow.core.fact_nft_sales s
    JOIN flow.core.dim_topshot_metadata m
    Run a query to Download Data