Skip to content
AI Lab
Generative AIData AnalyticsAI-assisted SQL analysisOpen in portfolio

SQL Analysis Studio

Turn business questions into MySQL queries with Gemini. Inspect business assumptions, run an isolated SQLite preview, refine queries and export a reproducible analysis.

Problem

AI-generated SQL can return plausible results while using the wrong join grain, filters or aggregation logic.

Approach

A structured Gemini workflow uses uploaded CSV schema statistics, explicit business rules and revision feedback to generate MySQL 8 queries and equivalent SQLite previews. An isolated, bounded SQL runner computes real results; AI checklists expose assumptions and possible logic errors for human review. MySQL scripts are exported for separate execution. No raw dataset rows are sent to Gemini, and SQLite execution is never presented as MySQL validation.

Key features

  • 01Upload up to three related CSV tables or start with a fictional retail dataset
  • 02Schema-aware SQL generation with explicit business rules and aggregation-grain review
  • 03MySQL 8 query export with dataset creation and insert statements
  • 04Read-only SQLite preview with a hard execution deadline and capped results
  • 05Inspect nested aggregation, conditional filters and join fan-out risks
  • 06Editable queries, user-guided refinement and a session revision history
  • 07Results CSV and reproducible JSON reports including source data and model metadata

Demo

Next project

Data Detective