Ask the database

Ask the Database is the mobile face of Hilal’s NL-to-SQL engine. Type a question in plain English; get rows back. Same backend as the web NL2SQL tool, with a UI tuned for mobile.

In this guide:

  • Pick a table
  • Ask a question
  • Read the result
  • Save a query
  • Generate a chart from a result

Prerequisites

  • AI usage available on your plan.
  • Some data already loaded in your account (a few days of orders / sales / etc.).

Step 1: Pick a table

Open AI Features → Tables.

You see the tables your subscription gives you access to. For sellers: orders, products, sales, fees, returns, ad campaigns. For chatbot users: conversations, messages, contacts, ratings.

Tap a table to start.

Step 2: Ask a question

The query screen has a question box at the top, the generated SQL in the middle, and the results below.

Type a question. Examples:

  • “Show me orders over $200 from the last 7 days, sorted by date.”
  • “Top 10 SKUs by units sold this month.”
  • “Conversations escalated to human in the last week, grouped by chatbot.”

Tap Run. The engine generates a SELECT query, runs it (read-only — no writes), and shows the rows.

Step 3: Read the result

Results render as a horizontally scrollable table optimized for phone screens. Tap a column header to sort; long-press a row to copy.

For result sets with more than ~20 rows, the table paginates; scroll the bottom-pagination bar to navigate.

Step 4: Save a query

If a question is one you’ll re-run (weekly / daily check), tap Save query. Saved queries appear under AI Features → Saved queries, runnable in one tap.

Saved queries also appear on the web. Tag them for organization.

Step 5: Generate a chart

For a result with the right shape (numeric column + grouping column), the Chart button generates a chart.

Charts render in line, bar, or stacked area depending on the result. Long-press to download as PNG.

Safety

The engine generates SELECT only. It cannot INSERT, UPDATE, or DELETE. The database role is read-only.

Coming soon

  • NL queries on combined sources — join data across products (e.g., “for each chatbot escalation, what was the buyer’s last order?”).
  • Voice query — ask the database with your voice.

Troubleshooting

  • “Couldn’t translate that question”. Rephrase more concretely. Mention column names if you know them.
  • Empty result. Try widening the date range or removing a filter.
  • “Query timeout”. Add a WHERE to narrow, or a LIMIT to cap.

Related articles