Query editor
-- This query used incompatible data types from Dune SQL alpha and may need to be updated.-- More details can be found on https://dune.com/docs/query/dunesql-changes/WITHdistinct_memes as (SELECT * FROM query_1880608 ORDER BY token_id),token_max_time as (SELECTtoken_id,max(created_at) as created_at_maxFROM reservoir.token_floor_ask_eventsWHERE contract = 0x33fd426905f149f8376e227d0c9d3340aad17af1 -- memesGROUP BY token_idORDER BY token_id),floor_price as (SELECT b.token_id,a.price,a.source,b.created_at_maxFROM reservoir.token_floor_ask_events aINNER JOIN token_max_time b ON a.token_id = b.token_id AND a.created_at = b.created_at_maxWHERE a.contract = 0x33fd426905f149f8376e227d0c9d3340aad17af1),meme_price_contract as (SELECT *FROM reservoir.token_floor_ask_eventsWHERE contract = 0x33fd426905f149f8376e227d0c9d3340aad17af1),meme_floor as (SELECT a.token_id,a.c_max,b.price/1e18 as price,b.sourceFROM meme_price_contract bINNER JOIN(SELECT token_id,max(created_at) as c_maxFROM meme_price_contractGROUP BY token_id) aON a.token_id = b.token_id AND a.c_max = b.created_at)SELECT b.token_id,meme_name as Meme,Price as "Floor Price ETH"FROM meme_floor aINNER JOIN distinct_memes b ON CAST(a.token_id as int) = b.token_idORDER BY b.token_id