Query editor
/*Data Sources:1. merchant_moe_mantle.moefactory_evt_paircreated: Used to get liquidity pool (pair) creation events for the Classic AMM variant of Merchant Moe2. erc20_mantle.evt_transfer: Used to get ERC-20 token transfers on the Mantle blockchain3. merchant_moe_mantle.moepair_evt_swap: Used to retrieve swap fee data for Classic AMM pairs on Merchant Moe4. merchant_moe_mantle.lbfactory_evt_lbpaircreated: Used to get liquidity pool (pair) creation events for the Liquidity Book variant of Merchant Moe5. merchant_moe_mantle.lbpair_evt_swap: Used to retrieve swap fee data for Liquidity Book pairs on Merchant Moe6. mantle.logs: Used to get raw events logged on the Mantle blockchain7. merchant_moe_mantle.feemanager_call_callcomponent: Used to get fee remittances distributed to $MOE stakers8. agni_mantle.agnifactory_evt_poolcreated: Used to get liquidity pool creation events on Agni Finance9. agni_mantle.agnipool_evt_swap: Used to retrieve swap fee data on Agni Finance10. tokens.erc20: Used to get ERC-20 token metadata on the Mantle blockchain11. prices.day: Used to get daily token prices12. dune.untamed_research.dataset_moe_coingecko_price: Used to get $MOE price data, sourced from CoinGecko13. dune.ngozibae_team_4689.dataset_protocol_apy: Used to get APY data for additional Mantle protocols, sourced from DefiLlama*/--> Merchamt Moe Info: CLAMM and Liquidity Book Pools Covered <--WITH merchant_moe AS(-- Classic AMMWITH clamm AS(WITH tokens AS(SELECT *FROM tokens.erc20 WHERE blockchain = 'mantle'),daily_prices AS(SELECTDATE_TRUNC('day', timestamp) AS date,contract_address,AVG(price) AS priceFROM prices.dayWHERE blockchain = 'mantle'GROUP BY 1,2),moe_price AS(SELECTdate,AVG(price_usd) AS price_usdFROM (SELECTDATE_TRUNC('day', DATE(date)) AS date,price_usdFROM dune.untamed_research.dataset_moe_coingecko_priceUNIONSELECTDATE_TRUNC('day', timestamp) AS date,price AS price_usdFROM prices.dayWHERE blockchain = 'mantle'AND contract_address = 0x4515A45337F461A11Ff0FE8aBF3c606AE5dC00c9)GROUP BY 1),get_pools AS (SELECT