Creating a Query
A saved query pairs a piece of SQL with a database connection and a name. Once saved, it can be run, shared, scheduled, and put on dashboards.
Steps
- From the Queries view, choose Add query (or open the editor).
- Select a connection — the database the query runs against.
- Write your SQL. The editor provides schema-aware autocomplete for your tables and columns. See Writing SQL.
- Run it to confirm it returns what you expect.
- Name and save the query.
A group on the Free plan can hold up to 3 saved queries. Upgrade to Power for unlimited queries — see Plans and limits.
GET-style vs. POST-style queries
Kvery classifies a query by its leading SQL keyword, which affects how it can be run and exposed:
- Read queries start with
SELECTorEXEC(andWITHfor CTEs). These are treated as safe-to-read and are callable overGET. - Write queries start with
INSERT,UPDATE,DELETE,REPLACE,ALTER, orCREATE. These modify data and are exposed over write methods (POST/PUT/PATCH/DELETE) when published as an API.
This classification is automatic — you do not configure it manually.
Adding parameters
To make a query reusable, turn values into input fields with form variables:
SELECT *
FROM orders
WHERE status = :status
AND created_at >= :from_date;
Kvery detects :status and :from_date and renders form fields for them. See
Form variables for field types, defaults,
and validation.
After saving
Once saved, your query appears in the Queries list. From there you can choose a result layout, enable sharing, set up a schedule, or add it to a dashboard.
If you need to edit a query that is already live (shared or used on a dashboard), consider using a draft so your changes are not published until you are ready.