Query editor
-- Combined query for unique Empire owners and distributionWITH all_empire_owners AS (-- Collect all empire owners with their empires from both v0 and v1SELECTowner,empireFROMempire_builder_v0_base.empirefactory_evt_empirecreatedWHEREcontract_address = 0x48e72445b4770Eab33e2Bb77ADBf6E0a9613c720UNION ALLSELECTowner,empireFROMempire_builder_v1_base.empirefactory_evt_empirecreatedWHEREcontract_address = 0xbbcc49BCFC64E24A0060ac0Bb725409e138B28Df),owner_empire_counts AS (-- Count empires per ownerSELECTowner,COUNT(*) as empires_ownedFROMall_empire_ownersGROUP BYowner),ownership_distribution AS (-- Distribution of owners by number of empires ownedSELECTempires_owned as "Empires Per Owner",COUNT(*) as "Number of Owners"FROMowner_empire_countsGROUP BYempires_ownedORDER BYempires_owned),total_unique_owners AS (-- Total count of unique ownersSELECTCOUNT(DISTINCT owner) as "Total Unique Owners"FROMall_empire_owners)-- Output both the total unique owners and the distributionSELECT(SELECT "Total Unique Owners" FROM total_unique_owners) as "Total Unique Owners","Empires Per Owner","Number of Owners"FROM