Query editor
WITH solana_dex_users AS (SELECTdate_trunc('day', block_time) AS day,signer AS user,CASE WHEN (array_contains(instructions.executing_account, 'mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68')OR array_contains(instructions.executing_account, '5fNfvyp5czQVX77yoACa3JJVEhdRaWjPuazuWgjhTqEH')OR array_contains(instructions.executing_account, 'JD3bq9hGdy38PuWQ4h2YJpELmHVGPPfFSuFkpzAd9zfu')) then 'Mango Markets'WHEN (array_contains(instructions.executing_account, 'J2NhFnBxcwbxovE7avBQCXWPgfVtxi5sJfz68AH6R2Mg')OR array_contains(instructions.executing_account, '9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin')OR array_contains(instructions.executing_account, '22Y43yTVxuUkoRKdm9thyRhQ3SdgQS7c7kB6UNCiaczD')OR array_contains(instructions.executing_account, 'EUqojwWA2rd19FZrzeBncJsm38Jm1hEhE3zsmX3bRc2o')OR array_contains(instructions.executing_account, 'BJ3jrUzddfuSrZHXSCxMUUQsjKEyLmuuyZebkcaFp2fg')OR array_contains(instructions.executing_account, '4ckmDgGdxQoPDLUkDT3vHgSAkzA3QRdNq5ywwY4sUSJn')) then 'Serum'WHEN array_contains(instructions.executing_account, 'srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX') then 'Openbook'WHEN (array_contains(instructions.executing_account, 'AMM55ShdkoGRB5jVYPjWziwk8m5MpwyDgsMWHaMSQWH6')OR array_contains(instructions.executing_account, 'CURVGoZn8zycx6FXwwevgBTB2gVvdbGTEpvMJDbgs2t4')) then 'Aldrin'WHEN (array_contains(instructions.executing_account, 'JUP6i4ozu5ydDCnLiMogSckDPpbtr7BJ4FtzYWkb5Rk')OR array_contains(instructions.executing_account, 'JUP2jxvXaqu7NQY1GmNF4m1vodw12LVXYxbFL2uJvfo')OR array_contains(instructions.executing_account, 'JUP3c2Uh3WA4Ng34tw6kPd2G4C5BB21Xo36Je1s32Ph')OR array_contains(instructions.executing_account, 'JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB')) then 'Jupiter Aggregator'WHEN (array_contains(instructions.executing_account, 'RVKd61ztZW9GUwhRbbLoYVRE5Xf1B2tVscKqwZqXgEr')OR array_contains(instructions.executing_account, '27haf8L6oxUeXrHrgEgsexjSY5hbVUWEmvv9Nyxg8vQv')OR array_contains(instructions.executing_account, '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8')OR array_contains(instructions.executing_account, 'CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK')) then 'Raydium'WHEN array_contains(instructions.executing_account, 'SSwpkEEcbUqx4vtoEByFjSkhKdCT862DNVb52nZg1UZ') then 'Saber'WHEN (array_contains(instructions.executing_account, 'MERLuDFBMmsHnsBPZw2sDQZHvXFMwp8EdjudcU2HKky')OR array_contains(instructions.executing_account, 'Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB')) then 'Meteora'WHEN (array_contains(instructions.executing_account, 'DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1')OR array_contains(instructions.executing_account, 'whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc')OR array_contains(instructions.executing_account, '9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP')) then 'Orca'WHEN array_contains(instructions.executing_account, 'SSwpMgqNDsyV7mAgN9ady4bDVu5ySjmmXejXvy2vLt1') then 'Step Finance'WHEN array_contains(instructions.executing_account, 'cysPXAjehMpVKUapzbMCCnpFxUFFryEWEaLgnb9NrR8') then 'Cykura'WHEN array_contains(instructions.executing_account, '6MLxLqiXaaSUpkgMnWDTuejNZEz3kE7k2woyHGVFw319') then 'Crema'WHEN array_contains(instructions.executing_account, 'EewxydAPCCVuNEyrVN68PuSYdQ7wKn27V9Gjeoi8dy3S') then 'Lifinity'WHEN array_contains(instructions.executing_account, 'Dooar9JkhdZ7J3LHN3A7YCuoGRUggXhQaG4kijfLGU2j') then 'Stepn'WHEN array_contains(instructions.executing_account, 'HyaB3W9q6XdA5xwpU4XnSZV94htfmbmqJXZcEbRaJutt') then 'Invariant'WHEN array_contains(instructions.executing_account, '7WduLbRfYhTJktjLw5FDEyrqoEv61aTTCuGAetgLjzN5') then 'GooseFX'WHEN array_contains(instructions.executing_account, 'PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY') then 'Phoenix'ELSE NULL END AS DEXFROM solana.transactionsWHERE (array_contains(instructions.executing_account, 'mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68') -- Mango Markets V3OR array_contains(instructions.executing_account, '5fNfvyp5czQVX77yoACa3JJVEhdRaWjPuazuWgjhTqEH') -- Mango Markets V2OR array_contains(instructions.executing_account, 'JD3bq9hGdy38PuWQ4h2YJpELmHVGPPfFSuFkpzAd9zfu') -- Mango Markets V1OR array_contains(instructions.executing_account, 'J2NhFnBxcwbxovE7avBQCXWPgfVtxi5sJfz68AH6R2Mg') -- AtrixOR array_contains(instructions.executing_account, '9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin') -- Serum DEX V3OR array_contains(instructions.executing_account, 'EUqojwWA2rd19FZrzeBncJsm38Jm1hEhE3zsmX3bRc2o') -- Serum DEX V2OR array_contains(instructions.executing_account, 'BJ3jrUzddfuSrZHXSCxMUUQsjKEyLmuuyZebkcaFp2fg') -- Serum DEX V1OR array_contains(instructions.executing_account, '4ckmDgGdxQoPDLUkDT3vHgSAkzA3QRdNq5ywwY4sUSJn') -- Serum DEX V1OR array_contains(instructions.executing_account, '22Y43yTVxuUkoRKdm9thyRhQ3SdgQS7c7kB6UNCiaczD') -- Serum SwapOR array_contains(instructions.executing_account, 'srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX') -- OpenbookOR array_contains(instructions.executing_account, 'AMM55ShdkoGRB5jVYPjWziwk8m5MpwyDgsMWHaMSQWH6') -- Aldrin AMMOR array_contains(instructions.executing_account, 'CURVGoZn8zycx6FXwwevgBTB2gVvdbGTEpvMJDbgs2t4') -- Aldrin AMM V2OR array_contains(instructions.executing_account, 'RVKd61ztZW9GUwhRbbLoYVRE5Xf1B2tVscKqwZqXgEr') -- Raydium Liquidity Pool V2OR array_contains(instructions.executing_account, '27haf8L6oxUeXrHrgEgsexjSY5hbVUWEmvv9Nyxg8vQv') -- Raydium Liquidity Pool V3OR array_contains(instructions.executing_account, '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8') -- Raydium Liquidity Pool V4OR array_contains(instructions.executing_account, 'CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK') -- Raydium CLAMMOR array_contains(instructions.executing_account, 'SSwpkEEcbUqx4vtoEByFjSkhKdCT862DNVb52nZg1UZ') -- Saber Stable SwapOR array_contains(instructions.executing_account, 'MERLuDFBMmsHnsBPZw2sDQZHvXFMwp8EdjudcU2HKky') -- Mercurial Stable SwapOR array_contains(instructions.executing_account, 'Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB') -- Meteora