cloudr3nJoepegs Hottest Collection by Sales
    Updated 2023-04-26
    -- weekly hottest collection
    with weekly_sales as(
    select tx_hash,to_date(block_timestamp) as day,event_inputs:collection as collection_address, event_inputs:price*power(10,-18) as avax_price, event_inputs:tokenId as tokenId, event_inputs:maker as seller,event_inputs:taker as buyer
    from avalanche.core.fact_event_logs
    where origin_to_address='0xae079eda901f7727d0715aff8f82ba8295719977' and event_name in ('TakerBid','TakerAsk') and current_date-day < 7
    )

    select
    case when collection_address='0xc70df87e1d98f6a531c8e324c9bcec6fc82b5e8d' then 'Smol Joes'
    when collection_address='0xacc0cf012b4c28e23e9450c9824a88a4e178a64a' then 'The Person'
    when collection_address='0x6af53a162deb0d3abfd4f47bd6c9615b08d553fd' then 'Doodleverse'
    when collection_address='0xc4252cadeff39a78d92b3150f08e4cadf88a8095' then '100 Web Characters'
    when collection_address='0x6cad7faa3f17e2e845cbf6defebdae44484d448e' then 'Toonlands Metaverse'
    when collection_address='0x9f98ccebdb3138c0ebfbdc9b9b94e2683bdaf1fb' then 'RaptOriginZ'
    when collection_address='0x880fe52c6bc4ffffb92d6c03858c97807a900691' then 'APA'
    when collection_address='0x9811eb6bfe8225833315ca5a2a13ebc9c249bc49' then 'EsoTeros'
    when collection_address='0xa0882da79f266ed8442656dcfc9fd3d71ab6eb2f' then 'Shamanic Roots'
    when collection_address='0xf675a87397a6239eaf95ad948670a5b19d076c59' then 'Banksy Love is in the Air'
    when collection_address = '0x92618c4c8ef2534242cabed0614ab8b89ef2dc52' then 'Beenz On Acid'
    when collection_address = '0x65787a9abc4563316b20ce6c46d0f46f4e357c36' then 'AvaPepes'
    when collection_address = '0xdcd0711505f7fb3daa3eb8b358e18020a87d58cc' then 'NavySealGame'
    when collection_address = '0x001e68282d52dcaba3749291bac33a9678073d01' then 'Pizza Game Chefs'
    when collection_address = '0xacc0cf012b4c28e23e9450c9824a88a4e178a64a' then 'The Person'
    when collection_address = '0xa69fee085a4c38656ce9c37a064a330725307482' then 'Avalant'
    when collection_address = '0xec675b7c5471c67e9b203c6d1c604df28a89fb7f' then 'Snail Trail'
    when collection_address = '0xe2c13aadb000a58f4348313f346b0f01cef95332' then 'DegenFrogs'
    when collection_address = '0x6cc4cc814c7154fb67965c8044cc803b3199ec53' then 'Pizza Game Chef Tools'
    when collection_address = '0xcf91b99548b1c17dd1095c0680e20de380635e20' then 'Roostr'
    when collection_address = '0x0e1ce5cd26d67fd416dc6a22eb97d60131d0901b' then 'Tadpole'
    when collection_address = '0x7ff31635e267df29bf47c9eb0880740a798a3bc8' then 'RunBlox'
    when collection_address = '0x3025c5c2aa6eb7364555aac0074292195701bbd6' then 'MadSkullz'
    when collection_address = '0x11cea873dd8adb5feb97875c317c771d887629fc' then 'Evil Beanz'
    when collection_address = '0x071defcaea5e76c035d8af2c56b9fa90e7394c4e' then 'VALIFI NFT'
    when collection_address = '0x4245a1bd84eb5f3ebc115c2edf57e50667f98b0b' then 'Hopper'
    when collection_address = '0x75c95c8e779b2fe9dd36c9fbdfa98d7eb06bc44b' then 'The Underground'
    when collection_address = '0xe8dba81d5b9f605d3c53c67adea91d295606ce74' then 'Cloudheadz'
    Run a query to Download Data