Query editor
-- (JM) forked, credit due to @tubaecciSELECTcollector,SUM(mints) as total_mints,SUM(fees) as "total fees eth"FROM (SELECTCOALESCE(c.name, CAST(to as varchar)) as collector,COUNT(*) as mints,sum(CAST(JSON_VALUE(data, 'strict $.finalArtistFee') as DOUBLE) / POW(10, 18)) as feesFROM query_3998157 AS aINNER JOIN sound_xyz_optimism.SuperMinterV2_evt_Minted AS b ON a.contract_address = b.editionLEFT JOIN ens.reverse_latest AS c ON to = c.addressGROUP BY 1UNION ALLSELECTCOALESCE(c.name, CAST(to as varchar)) as collector,COUNT(*) as mints,sum(CAST(JSON_VALUE(data, 'strict $.finalArtistFee') as DOUBLE) / POW(10, 18)) as feesFROM query_3998157 AS aINNER JOIN sound_xyz_optimism.SuperMinter_evt_Minted AS b ON a.contract_address = b.editionLEFT JOIN ens.reverse_latest AS c ON to = c.addressGROUP BY 1UNION ALLSELECTCOALESCE(c.name, CAST(to as varchar)) as collector,COUNT(*) as mints,sum(CAST(JSON_VALUE(data, 'strict $.finalArtistFee') as DOUBLE) / POW(10, 18)) as feesFROM query_3998157 AS aINNER JOIN sound_xyz_ethereum.SuperMinterV2_evt_Minted AS b ON a.contract_address = b.editionLEFT JOIN ens.reverse_latest AS c ON to = c.addressGROUP BY 1UNION ALLSELECTCOALESCE(c.name, CAST(to as varchar)) as collector,COUNT(*) as mints,sum(CAST(JSON_VALUE(data, 'strict $.finalArtistFee') as DOUBLE) / POW(10, 18)) as feesFROM query_3998157 AS aINNER JOIN sound_xyz_ethereum.SuperMinter_evt_Minted AS b ON a.contract_address = b.editionLEFT JOIN ens.reverse_latest AS c ON to = c.addressGROUP BY 1UNION ALLSELECTcoalesce(ens.name, cast(a.to as varchar)) as collector,