Query editor
WITH norm AS (SELECTDISTINCT repayment_tx_id,CAST(repaid_date AS DATE) AS day,liquidium_fee_sats,collateraltype,typeFROM dune.liquidiumwtf.liquidium_repaid_feeWHERE repaid_date IS NOT NULL)SELECTday,collateraltype,type,SUM(liquidium_fee_sats) AS total_fee_satsFROM normGROUP BY day, collateraltype, typeORDER BY day;