Creating Custom SQL Queries
Use custom SQL when the visual query builder is not expressive enough and keep the query readable, parameterized, and testable.
Use custom SQL when the query builder stops expressing the real query clearly
Custom SQL is useful when the visual query builder is no longer the clearest way to express what the database needs to do. The goal is not to abandon Wappler’s data tooling. The goal is to keep complex query intent readable while still returning structured output to the rest of your app.
A practical pattern is start from the result shape, then write the smallest query that produces it
The safest way to begin is to define what rows and columns the page or workflow actually needs, then write the query around that requirement. This keeps the SQL focused, makes output naming deliberate, and reduces the temptation to return a giant dataset the UI does not need.
Next steps
Use the related tours below when you want more context about how custom SQL fits into the larger Wappler data workflow.