Report Studio: ask Kyo or write SQL
You can ask Kyo to write a report from a description, edit it with follow-ups, or write custom SQL queries yourself.
বাংলায়: Report Studio-তে দুটি উপায় আছে কোড ছাড়াই রিপোর্ট তৈরি করার: Ask Kyo ট্যাবে বাংলায় বলুন কী দেখতে চান, বা SQL ট্যাবে নিজে SQL লিখুন। {{start}} আর {{end}} দিয়ে তারিখের রেঞ্জ নির্ধারণ করুন, তারপর চালান।
Where to find it: Sidebar › Reports › the Report Studio tab › the Ask Kyo or SQL tabs
Ask Kyo to write a report
The Ask Kyo tab is a chat where you describe what the report should show, and Kyo writes the SQL and runs it.
- Open Report Studio and select the Ask Kyo tab.
- Type a description of what you want to see. For example: "Profit by product this month", "Return rate by city", "Which customers spent the most".
- Press Enter or select the send button (the up arrow).
Kyo writes the SQL, runs the report and shows the results below. If the first run doesn't look right, you can ask Kyo to change it without starting over.
Kyo suggestions and follow-ups
When you first open the Ask Kyo tab, Kyo shows five suggestions: "Net profit by day this period", "Which products make the most profit", "Return rate by courier and city", "Ad spend against sales by day", "Best customers by lifetime spend". Select one to run it straight away.
Once Kyo has written a report, you can follow up with changes:
- "Split it by courier" — adds another dimension without losing what came before.
- "Only Dhaka" — adds a filter.
- "Sort by highest profit" — changes the sort.
- "Show the top 10" — changes the row limit.
Each follow-up builds on the report as it stands, so the context carries over. You can make many changes in one conversation.
What Kyo does
Kyo reads your description and turns it into a SQL query. It knows about your datasets (Sales, Orders, Products, Expenses), your metrics (Revenue, Gross profit, Delivery rate, etc.) and dimensions (Day, City, Courier, Payment method, Status). It also knows what tables are available if you ask for something custom.
If there is an error (e.g. the query runs but finds no rows, or asks for a column that doesn't exist), Kyo shows the error and suggests a fix.
Errors and review
If Kyo's report doesn't work, the error message shows and Kyo suggests a next step. For example, "The column 'returned_units' doesn't exist in the orders table. Try asking for 'products on returned orders'."
You can always select the SQL tab to see the query Kyo wrote and review it before trusting the results. The SQL tab shows exactly what ran.
Write a report in SQL
The SQL tab is a code editor where you write custom queries. You can start blank or ask Kyo first, then edit the SQL yourself.
- Open the SQL tab.
- Write a SELECT query. Use table names (e.g. orders, product_sales, sales, expenses) and column names from the query suggestions (type a table name followed by a dot to see its columns). A hints bar at the bottom shows suggestions as you type.
- Use {{start}} and {{end}} as placeholders for the date range selected on the page. For example:
WHERE created_date >= {{start}} AND created_date < {{end}}. You don't need to write the dates yourself. - Press Ctrl+Enter (or Cmd+Enter on Mac) to run the query, or select the Run button.
The results appear below. If there is an error, it shows what went wrong. You can edit and run as many times as you like.
Report Studio SQL: rules, limits and tables
Query rules:
- Write one SELECT query only (no semicolon, no comments, no multiple statements).
- Column names and table names are case-insensitive.
- Use {{start}} and {{end}} for the date range. Do not write literal dates.
Limits:
- Maximum 2,000 rows returned. If your query finds more, only the first 2,000 are shown and a banner says "Result was truncated".
- Maximum 20,000 characters in the query.
Available tables:
The query suggestions at the bottom show available tables and columns as you type. Common tables are:
orders— every order (date, status, customer, payment method, source, etc.)sales— orders grouped by day (booked sales, gross profit, courier fees, etc.)product_sales— orders grouped by product (units sold, revenue, gross profit, etc.)expenses— expenses by date and categoryinventory— current stock by product and locationparcels— shipment data (status, courier, delivery date, etc.)returns— returned orders with reasoncustomers— customer info (city, phone, lifetime spend, etc.)
There are more tables — the suggestions show all of them. Some tables are views that join multiple sources (e.g. sales joins orders and product_sales).
Column naming:
Column names are lowercase with underscores (e.g. created_date, gross_profit, average_order_value). The table suggestions show exact column names — copy them to avoid errors.
Error messages:
Common errors and fixes:
- "table doesn't exist" — check spelling. Table names are listed in the suggestions.
- "column doesn't exist in table" — select the table name in the editor and a dot (e.g.
orders.) to see its columns. - "more than one row returned but expecting one" — use GROUP BY or limit to one row with LIMIT 1.
- "date format is not recognised" — use {{start}} and {{end}}, not literal dates.
Other ways people ask this
- কিয়ো দিয়ে রিপোর্ট লেখান
- এসকিউএল দিয়ে রিপোর্ট বানাব কীভাবে
- {{start}} আর {{end}} ব্যবহার করতে হবে কোথায়
- kyo use korbe report likhte
- sql likhte sherbo kivabe
- {{start}} ar {{end}} keo use korbo kivabe
- sql editor te suggestion din
- kyo error dekhis, fix korbo kintu
- follow up kore kyo ke change bole
- query truncated hocche, limit komabo
- sql bar tey code dhikane hoi
Related pages
- Report Studio — the builder and charts
- Report Studio datasets, metrics and templates — the complete list of tables and what each column means
- Ask Kyo about report numbers and build reports — more about how Kyo works
Related guides
Checked against the product on 2026-10-02.