Query editor
SELECTCASEWHEN LOWER(TRIM(SPLIT_PART(dune.mateo_pbw.dataset_pbw25_sib_top12_data.blockchains, ',', t.ordinality))) = 'evms'THEN 'Ethereum'ELSE INITCAP(TRIM(SPLIT_PART(dune.mateo_pbw.dataset_pbw25_sib_top12_data.blockchains, ',', t.ordinality)))END AS blockchain,COUNT(*) AS blockchain_count,(COUNT(*) * 100.0) / SUM(COUNT(*)) OVER () AS percentageFROM dune.mateo_pbw.dataset_pbw25_sib_top12_dataCROSS JOIN UNNEST(SPLIT(blockchains, ',')) WITH ORDINALITY AS t(blockchains, ordinality)WHEREsegments != ''AND dune.mateo_pbw.dataset_pbw25_sib_top12_data.blockchains != ''-- Exclure les réponses 'Other' et 'Other (add in comment)'AND LOWER(TRIM(SPLIT_PART(dune.mateo_pbw.dataset_pbw25_sib_top12_data.blockchains, ',', t.ordinality))) NOT IN ('other', 'other (add in comment)')GROUP BYCASEWHEN LOWER(TRIM(SPLIT_PART(dune.mateo_pbw.dataset_pbw25_sib_top12_data.blockchains, ',', t.ordinality))) = 'evms'THEN 'Ethereum'ELSE INITCAP(TRIM(SPLIT_PART(dune.mateo_pbw.dataset_pbw25_sib_top12_data.blockchains, ',', t.ordinality)))ENDORDER BYblockchain_count DESC;