Query editor
WITH categorized_owners AS (SELECT DISTINCT owner_key, primary_categoryFROM dune.dune.result_labels_owner_details_mat_viewWHERE primary_category IN ('Social Engineering Scams', 'Hacks and exploits'))SELECTco.owner_key,addr.addressFROM categorized_owners coLEFT JOIN dune.dune.result_label_owner_addresses_mat_view addrON co.owner_key = addr.owner_keygroup by co.owner_key, addr.address