Query editor
/* Migration success :)There are some cases such as unnest/sequence and array/json functions the migrator won't take care of for you(but we have examples of in the docs linked below!)If you're still running into issues, check out the doc examples https://dune.com/docs/reference/dune-v2/query-engine/or reach out to us in the Dune discord in the #dune-sql channel.*/WITHeth AS (SELECTSUM(CAST(amount_usd AS DOUBLE)) / 1e9 AS eth_bill_volFROMdex."trades" AS tWHEREt.blockchain = 'ethereum'AND block_time > NOW() - INTERVAL '7' day),all AS (SELECTSUM(CAST(amount_usd AS DOUBLE)) / 1e9 AS all_bill_volFROMdex."trades" AS tWHEREblock_time > NOW() - INTERVAL '7' day)SELECTeth_bill_vol / all_bill_vol * 100 AS agg_shareFROMeth,all