Query editor
WITH cex_labels AS (SELECT DISTINCTaddress,'cex' AS category,COALESCE(distinct_name, cex_name) AS subtypeFROM cex_polygon.addresses),dex_labels AS (SELECT DISTINCTproject_contract_address as address,'dex' AS category,project AS subtypeFROM dex.tradeswhere blockchain = 'polygon'),defi_labels_1 AS (SELECT DISTINCTaddress,'defi' AS category,COALESCE(project, project_type) AS subtypeFROM addresses_ethereum.defi),defi_labels_2 AS (SELECT DISTINCTproject_contract_address,'defi' AS category,'uniswap-v3' AS subtypeFROM uniswap_v3_polygon.tradesWHERE blockchain = 'polygon'),defi_labels_3 AS (SELECT DISTINCTproject_contract_address,'defi' AS category,'uniswap' AS subtypeFROM uniswap_v3_ethereum.tradesWHERE blockchain = 'polygon'),defi_labels_4 AS (SELECT DISTINCTmarket_address,'defi' AS category,project AS subtypeFROM perpetual.tradesWHERE blockchain = 'polygon'),-- l2_labels AS (-- SELECT DISTINCT-- address,-- 'l2' AS category,-- COALESCE(description, protocol_name, role_type, submitter_type, version) AS subtype-- FROM addresses_ethereum.l2_batch_submitters-- ),