Query editor
WITH date_range AS (SELECTdate(cast('2021-10-19 00:00' as timestamp)) as start_date,date(current_timestamp) as end_date),eth_prices AS (SELECTdate_trunc('week', p.minute - INTERVAL '1' day) + INTERVAL '1' day as week,AVG(p.price) as eth_priceFROM prices.usd pWHERE p.contract_address = 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee -- ETHAND p.minute BETWEEN (SELECT start_date FROM date_range) AND (SELECT end_date FROM date_range)GROUP BY date_trunc('week', p.minute - INTERVAL '1' day) + INTERVAL '1' day)SELECTCAST('2022-10-24' AS DATE) as mintdate, CONCAT('<a href="https://www.vellumla.com/news/vellum-la-x-feral-file-present-simulation-sketchbook-works-in-process', '" target="_blank" >','Simulation Sketchbook | Feral File' , '</a>') as collection, '-' as revenueUNION SELECTCAST('2023-03-02' AS DATE) as mintdate, CONCAT('<a href="https://verse.works/artworks/27c885d5-4b98-43ed-bf03-ec42996ac891', '" target="_blank" >','Sleeping Rough | Centrefold' , '</a>') as collection, '-' as revenue-- Three Steps Ahead:UNION SELECTCAST('2023-03-20' AS DATE) as mintdate, CONCAT('<a href="https://rarepass.superrare.com/series', '" target="_blank" >','Three Steps Ahead | Superrare' , '</a>') as collection, format('%.4f',bc.value / 1e+18) as revenueFROM ethereum.traces bcWHERE bc.tx_hash = 0x13c973087e5d0577b7edee854364285eaee949c3f8bcc8fd500f79e9f9844feaAND bc.block_number = 16887424AND bc.to = 0x35bb964878d7b6ddfa69cf0b97ee63fa3c9d9b49-- Seaport SubjectUNION SELECTCAST('2023-03-27' AS DATE) as mintdate, CONCAT('<a href="https://verse.works/artworks/5227e19b-c6aa-4d00-b6a9-dff08f8cc1be', '" target="_blank" >','Seaport Subject | Verse' , '</a>') as collection, format('%.4f',SUM(royalty_fee_amount)) as revenueFROM seaport_ethereum.tradesWHERE nft_contract_address = 0xdcb1c3275ca97f148f6da1b0ee85bcb75cc9c5a4UNION SELECTCAST('2023-05-24' AS DATE) as mintdate, CONCAT('<a href="https://superrare.com/0x1b6745f9a95b9ee195cff963dd6ef03dbf486257/flowering-of-ideas-w--botto-3', '" target="_blank" >','Flowering of ideas | Ryan Koopmans' , '</a>') as collection, format('%.4f',(bc.amount_original * 0.85 / 2)) as revenueFROM nft.trades bc--Filtering to only Botto x Ryan Koopmans collaboration:WHERE bc.nft_contract_address = 0x1b6745f9a95b9ee195cff963dd6ef03dbf486257AND cast(bc.token_id as varchar) = '3'AND bc.tx_from = 0xfcbe1f6ec1c26c8f48bd835d650a3383ea1797c2UNION SELECTCAST('2023-06-20' AS DATE) as mintdate