Query editor
WITH liquidium_tx AS (SELECTCAST(tx_id AS VARCHAR) AS tx_id,start_date,borrower_taproot,lender_taproot,borrower_segwit,lender_segwit,principal_amount_sats,collateraltype,slugFROM dune.liquidiumfi.dataset_liquidium_v2UNION ALLSELECTCAST( tx_id AS VARCHAR) AS tx_id,start_date,borrower_taproot,lender_taproot,borrower_segwit,lender_segwit,principal_amount_sats,collateraltype,slugFROM dune.liquidiumfi.dataset_liquidium_v3UNION ALLSELECTDISTINCT tx_id,start_date,borrower_taproot,lender_taproot,borrower_segwit,lender_segwit,principal_amount_sats,collateraltype,slugFROM dune.liquidiumfi.liquidium_tx3_live)SELECT*,DATE_TRUNC('week', CAST(from_iso8601_timestamp(start_date) AS TIMESTAMP)) AS week_startFROM liquidium_txORDER BY start_date DESC