Query editor
-- Hunt Town Total Statistics with USD Values-- Mintpad: 0xfb51D2120c27bB56D91221042cb2dd2866a647fE-- HuntDrop: 0x6Bc50949F2b1301082Aa863A7C4869f49099Cd8b-- HUNT Token: 0x37f0c2915CeCC7e977183B8543Fc0864d03E064CWITH hunt_price AS (SELECTSUM(price_usd * volume_hunt) / NULLIF(SUM(volume_hunt), 0) AS hunt_price_usdFROM (SELECTCASEWHEN token_bought_address = 0x37f0c2915CeCC7e977183B8543Fc0864d03E064CTHEN amount_usd / NULLIF(token_bought_amount, 0)WHEN token_sold_address = 0x37f0c2915CeCC7e977183B8543Fc0864d03E064CTHEN amount_usd / NULLIF(token_sold_amount, 0)END AS price_usd,CASEWHEN token_bought_address = 0x37f0c2915CeCC7e977183B8543Fc0864d03E064CTHEN token_bought_amountWHEN token_sold_address = 0x37f0c2915CeCC7e977183B8543Fc0864d03E064CTHEN token_sold_amountEND AS volume_huntFROM dex.tradesWHEREblockchain = 'base'AND (token_bought_address = 0x37f0c2915CeCC7e977183B8543Fc0864d03E064COR token_sold_address = 0x37f0c2915CeCC7e977183B8543Fc0864d03E064C)AND block_time > now() - interval '1' day) tWHERE price_usd IS NOT NULL),mintpad_votes AS (SELECT COUNT(*) AS total_voting_count,SUM(CAST(varbinary_to_uint256(bytearray_substring(data, 1, 32)) AS DOUBLE)) AS total_voting_pointsFROM base.logsWHERE contract_address = 0xfb51D2120c27bB56D91221042cb2dd2866a647fEAND topic0 = 0x11f6adc2fa88c619a7c703c0d9c01edcf23678c3b38934e8a63721657cfa29dc),mintpad_claims AS (SELECT COUNT(*) AS total_claimed_count,SUM(CAST(varbinary_to_uint256(bytearray_substring(data, 33, 32)) AS DOUBLE)) / 1e18 AS total_hunt_claimedFROM base.logsWHERE contract_address = 0xfb51D2120c27bB56D91221042cb2dd2866a647fEAND topic0 = 0x6f9c9826be5976f3f82a3490c52a83328ce2ec7be9e62dcb39c26da5148d7c76),huntdrop_claims AS (SELECT COUNT(*) AS total_airdrop_count,SUM(CAST(varbinary_to_uint256(bytearray_substring(data, 1, 32)) AS DOUBLE)) / 1e18 AS total_airdrop_huntFROM base.logsWHERE contract_address = 0x6Bc50949F2b1301082Aa863A7C4869f49099Cd8bAND topic0 = 0x1064ac871100dbd5c03f209956d76c44e5d94d3d0a9fe85b1165d34318b7629d)SELECTv.total_voting_count,