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].SELECTDATE_TRUNC('week', block_time) AS time,SUM(CASEWHEN success = 'failed' THEN 1ELSE 0END) AS failed_txs,SUM(CASEWHEN success = 'failed'AND tx_to = project_contract_address THEN 1ELSE 0END) AS failed_own_txs,SUM(CASEWHEN success = 'failed'AND tx_to <> project_contract_address THEN 1ELSE 0END) AS failed_ext_txs,SUM(CASEWHEN success = 'success'AND from_amount > 0 THEN 1ELSE 0END) AS success_txs,SUM(CASEWHEN success = 'success'AND from_amount > 0AND tx_to = project_contract_address THEN 1ELSE 0END) AS success_own_txs,SUM(CASEWHEN success = 'success'AND from_amount > 0AND tx_to <> project_contract_address THEN 1ELSE 0END) AS success_ext_txs,SUM(CASEWHEN success = 'success'AND from_amount = 0 THEN 1ELSE 0END) AS empty_txs,(SUM(CASEWHEN success = 'failed'AND block_time > CAST('2020-06-01' AS TIMESTAMP) THEN 1