Query editor
-- This query has been migrated to run on DuneSQL.-- If you need to change back because you’re seeing issues, use the Query History view to restore the previous version.-- If you notice a regression, please email [email protected].WITHsucceed AS (SELECTDATE_TRUNC('hour', block_time) AS hour,COUNT(call_success) AS successFROMmaker_ethereum.CAT_call_biteLEFT JOIN ethereum."transactions" AS tx ON call_tx_hash = tx.hashWHEREcall_success = TRUEGROUP BY1),failure AS (SELECTDATE_TRUNC('hour', block_time) AS hour,COUNT(call_success) AS failFROMmaker_ethereum.CAT_call_biteLEFT JOIN ethereum."transactions" AS tx ON call_tx_hash = tx.hashWHEREcall_success = FALSEGROUP BY1)SELECTsucceed.hour,SUM(success) AS successful_liquidation,SUM(fail) AS failed_liquidation,SUM(fail) / CAST(SUM(fail + success) AS DOUBLE) AS success_rateFROMsucceedLEFT JOIN failure ON succeed.hour = failure.hourGROUP BY1ORDER BY1 DESCLIMIT22