Query editor
WITHdbc_pr AS (SELECTtx_id,token_bought_amount_raw,token_sold_amount_rawFROM query_5533240),defillama AS (SELECTtx_id,actual_input_amount,output_amountFROM query_5529722),joined AS (SELECTf.tx_id,d.token_bought_amount_raw,d.token_sold_amount_raw,f.actual_input_amount,f.output_amount,CASEWHEN ABS(CAST(d.token_bought_amount_raw AS BIGINT) - CAST(f.output_amount AS BIGINT)) <= 10 THEN '✅'ELSE '❌'END AS bought_vs_output,CASEWHEN ABS(CAST(d.token_sold_amount_raw AS BIGINT) - CAST(f.actual_input_amount AS BIGINT)) <= 10 THEN '✅'ELSE '❌'END AS sold_vs_inputFROM dbc_pr AS dJOIN defillama AS fON d.tx_id = f.tx_id)SELECT *FROM joinedWHERE bought_vs_output = '❌' OR sold_vs_input = '❌'