Skip to main content
All CollectionsGetting startedHow to create a custom groupingFAQ about Custom groupings
#1. As a super user, I would like to access the underlying SQL generated for the Custom grouping in order to use it for my own project. How can I access it?
#1. As a super user, I would like to access the underlying SQL generated for the Custom grouping in order to use it for my own project. How can I access it?
Jonas Østergård Bæk avatar
Written by Jonas Østergård Bæk
Updated over 6 months ago

Question: As a super user, I would like to access the underlying SQL generated for the Custom Grouping in order to use it for my own project. How can I access it?

Answer: To access the generated SQL, you can use the 'More' menu for the specific data source you're interested in obtaining the CASE statement for. Within the 'More' menu, you can click on 'Copy SQL' to retrieve the current SQL and copy it to your clipboard. From there, you can easily paste it into your own project wherever you are building it.

CASE 
WHEN (LOWER(source_medium) = 'demo') THEN 'demo'
WHEN (NOT(LOWER(campaign) LIKE '%alvie%')) THEN 'Some other channel'
ELSE 'Other'
END
Did this answer your question?