Open the course and begin with how text to SQL works.
It is an advanced course, taught in English, for people who build AI features.
Mirage Academy · Course · Advanced · SQL
Natural Language to SQL & Conversational Analytics is an advanced course for software engineers and technical product people who build AI features. Your colleagues ask data questions in plain language. You build the analyst that answers them: it understands the schema and your business definitions, validates its SQL before anything runs, executes under permissions and row-level security, and explains the result with evidence.
The loop
Watch the intro video, then read the loop as four pairs: what a model would guess, and the check that stands in its place.

Your colleagues ask data questions in plain language. A model can write the SQL, but it may guess a definition, read rows it should not, or give an answer nobody can check. This course is for whoever must make that safe. The course builds one loop. First, the analyst understands the schema and your business definitions. Then it generates SQL and validates it before anything runs. Next, it executes under permissions and row-level security. Finally, it explains the result with evidence. Each part replaces a guess with a check. Terms come from a semantic layer. SQL is validated before it runs. Queries respect each user's permissions. Answers carry evidence, and you evaluate the whole system. If you build or run analytics and want a model to answer data questions safely, start with chapter one: how text-to-SQL works.
The analyst understands the schema and your business definitions.
It generates SQL and validates it before anything runs.
It executes under permissions and row-level security.
It explains the result with evidence.
Chapter 1
Two example queries are written differently and return the same result. The table and numbers are made up.
Example
Query ASELECT COUNT(*) FROM orders WHERE status = 'paid'Query BSELECT SUM(1) FROM orders o WHERE o.status IN ('paid')Result of both| orders |
|---|
| 3 |
The text differs and the result matches, so the answer counts as right.
Lesson 1 of 5 in this chapter.
Lesson 2 of 5 in this chapter.
Lesson 3 of 5 in this chapter.
Lesson 4 of 5 in this chapter.
Lesson 5 of 5 in this chapter.
Chapter 2
A small example schema. One cryptic column carries a description, and a table the question does not need is dimmed.
Example schema
orders.customer_id joins customers.id(foreign key to primary key)
Lesson 1 of 5 in this chapter.
Lesson 2 of 5 in this chapter.
Lesson 3 of 5 in this chapter.
Lesson 4 of 5 in this chapter.
Lesson 5 of 5 in this chapter.
Chapter 3
An example question with two honest answers, and the definition that settles which one the analyst gives.
What was revenue last month?
Example
SUM(amount)SUM(net_amount)name: revenuemeans: net of refundsdimension: monthLesson 1 of 5 in this chapter.
Lesson 2 of 5 in this chapter.
Lesson 3 of 5 in this chapter.
Lesson 4 of 5 in this chapter.
Lesson 5 of 5 in this chapter.
Chapter 4
Pick an example query and a role. The text check lists the rules the query fails, and a passing query runs on an example table.
Made-up queries, orders and roles, shown only to explain the method. This is a small example, not a production validator.
SELECT region, SUM(amount) AS total FROM orders GROUP BY region LIMIT 100The text check passed, so the query runs.
| region | total |
|---|---|
| East | 1380 |
The rule: the text check passes a query only when it holds no comment marker, is a single statement, starts with SELECT or WITH, contains no write or schema keyword, reads only allowed tables and carries a row cap of at most 100. It reads text only. In this example a role with a region sees only that region's rows, whatever the query says. Row-level security itself is the topic of chapter 5.
Lesson 1 of 5 in this chapter.
Lesson 2 of 5 in this chapter.
Lesson 3 of 5 in this chapter.
Lesson 4 of 5 in this chapter.
Lesson 5 of 5 in this chapter.
Chapter 5
Three lessons name the layers around the data. Two more cover prompt injection through data and personal data.
Example drawing
Least privilegeTime and size limitsRow-level securityThe dataLesson 1 of 5 in this chapter.
Lesson 2 of 5 in this chapter.
Lesson 3 of 5 in this chapter.
Lesson 4 of 5 in this chapter.
Lesson 5 of 5 in this chapter.
Chapter 6
An example answer in which each number points to a cell of the result, followed by a caveat.
East revenue in March was 1,380. West revenue was 1,600.
| region | revenue |
|---|---|
| East | 1,380 |
| West | 1,600 |
CaveatRevenue here means net of refunds, as the metric defines it.
Lesson 1 of 5 in this chapter.
Lesson 2 of 5 in this chapter.
Lesson 3 of 5 in this chapter.
Lesson 4 of 5 in this chapter.
Lesson 5 of 5 in this chapter.
Chapter 7
Two example sets with the same share correct. The range shows how far each score can be trusted.
Range for the true share (about 95 percent)Example sets
Both sets score 90 percent. The small set cannot rule out a much lower true score.
Lesson 1 of 5 in this chapter.
Lesson 2 of 5 in this chapter.
Lesson 3 of 5 in this chapter.
Lesson 4 of 5 in this chapter.
Lesson 5 of 5 in this chapter.
Chapter 8
You assemble, harden and evaluate the analyst, write its user guide and decide on its release.
Lesson 1 of 5 in this chapter.
Lesson 2 of 5 in this chapter.
Lesson 3 of 5 in this chapter.
Lesson 4 of 5 in this chapter.
Lesson 5 of 5 in this chapter.
Capstone: a safe conversational analystOpen the course: Natural Language to SQL & Conversational Analytics
How you learn here
Where to go next
Three pages are close to this course.
The business side: a beginner course on answering business questions with data and AI, and telling evidence from speculation. The catalog says no programming is needed.
The data side: an advanced course on building an ingestion, transformation and retrieval pipeline that keeps AI applications fed with good data.
The prompt side: how to write instructions for a model, which matters for the generation prompt in chapter four.
AI data analytics course →Data engineering for AI course →Prompt engineering course guide →
An advanced course in which you build a conversational data analyst that writes safe SQL and explains its evidence. It runs for eight chapters and finishes with a capstone.
The course is for engineers and technical product people who build AI features. The catalog marks it as advanced.
A safe conversational analyst. You assemble it, harden it, evaluate it, write the user guide and make the release decision.
Chapter four covers static validation, EXPLAIN as a guard, retry with feedback and testing the validator. Chapter five covers least privilege, time and size limits, row-level security, prompt injection through data and personal data.
Chapter six covers the evidence package, why numbers come from the result, caveats, rounding and percentages, and definitions and ambiguity.
This course is advanced and is for people who build the analyst. The AI data analytics course is a beginner course for professionals who answer business questions with data and AI, and no programming is needed there.
Yes. A check code on it can be looked up on the public check page. The Get certified page says it carries no state recognition.
You explain your design decisions by voice, and the coach, which is an AI, asks again where an explanation is unclear. It cannot tell you whether you will be certified.
It is an advanced course, taught in English, for people who build AI features.