What Is Gemini-SQL2 and How Does It Work?

Gemini-SQL2 is Google's new AI that turns plain English questions into working SQL database queries. You ask a question like you'd ask a person, and it writes and runs the query for you. No SQL coding knowledge needed.

It works by understanding your question, figuring out which tables and columns to use, and generating the SQL code. Then it runs that code against your database and returns the answer. This means anyone can get insights from their data—not just developers or data analysts.

What Makes Gemini-SQL2 Different?

The big difference is how accurate it is. On the BIRD benchmark, Gemini-SQL2 scored 80.04% execution accuracy—the highest for any single model. The previous best was 77.2%. That's a three-point jump in one release.

BIRD isn't easy. It covers 12,751 question-SQL pairs across 95 databases in 37 professional domains. It checks whether the SQL actually runs and returns correct results, not just if the code looks right. By comparison, humans score 92.96%, so Gemini-SQL2 is only about 13 points behind people.

This makes it clearly ahead of other models. Google's prior version, Gemini-SQL, was at 77.2%. AWSQ-SQL was around 76.5%. Claude Opus from Anthropic was around 70.1%.

How to Set Up a Text-to-SQL Workflow Now

Gemini-SQL2 isn't publicly available yet. There's no API, model card, or release date. But you can build a similar workflow using Gemini 3.1 Pro, which is available right now.

  1. Choose your database, like your member database or course platform.
  2. Write out your database schema in plain text. List your tables, columns, and what each data field means.
  3. Connect Gemini 3.1 Pro to that schema using the Gemini API.
  4. Ask your question in plain English using a schema-grounded prompt.
  5. Let Gemini generate the SQL query and run it against your data.

You'll get answers without writing any code yourself.

Practical Examples You Can Try

Once you have your setup, you can ask questions like:

  • Which of our members joined in the last 30 days and haven't posted yet?
  • Which tutorial had the most engagement this month?
  • How many new members joined from YouTube in the last 14 days?

For a community like the AI Profit Boardroom, you could ask: "Which members have been active for more than 90 days and haven't posted in the community map yet?" That gives you a re-engagement list.

You can also ask: "Which coaching call topics had the most live attendees over the last quarter?" Use that to plan future calls. The AI handles the technical part, so you get instant answers.

Pair Gemini-SQL2 with Gemini 3.1 Pro for Deeper Insights

Once you pull data with a text-to-SQL tool, you can add Gemini 3.1 Pro on top to interpret it. Instead of just numbers, you get analysis and recommendations.

For example, you could feed it the last 30 days of tutorial completions and coaching call attendance. Then ask: "Tell me what patterns you see and what I should do about them."

This turns your setup into an AI analyst. Gemini-SQL2 pulls the data, Gemini 3.1 Pro interprets it, and you make the decision. It's a powerful stack for any business.

Benchmark Results and Comparisons

On the BIRD benchmark, Gemini-SQL2 scores 80.04% execution accuracy. That's the top spot for single models. The previous best was 77.2% from Google's Gemini-SQL. AWSQ-SQL was at 76.5%, and Claude Opus was at 70.1%.

Human performance on BIRD is 92.96%. So Gemini-SQL2 is now about 13 points behind humans. That gap is closing fast. These results show that Google is number one at turning plain English into working database queries.

Tips, Limits, and Mistakes to Avoid

One limit is that Gemini-SQL2 isn't public yet. Don't wait for it. Start building your workflow now with Gemini 3.1 Pro.

To get good results, make sure your schema is clear. Define what each table and column means. If the AI doesn't understand your data, it can't give accurate answers.

Also, remember this isn't only for big businesses. If you have an email list, course platform, booking system, or community platform, you can ask questions about that data. The key is asking the right questions.

Another tip: don't just stop at the answer. Pair your query tool with an AI like Gemini 3.1 Pro to interpret the data and suggest actions. That way you get insights, not just numbers.

Who Should Use This and Why It Matters

This is for anyone who runs a business and has data they can't easily use. If you have a database but no one who knows SQL, this removes that wall. You can finally get answers from your data without hiring a developer.

Most businesses sit on mountains of data they can't access. With a text-to-SQL tool, you can stop guessing and start knowing. You can identify at-risk members, see what content works, and plan better actions.

Google plans to put Gemini-SQL2 into its data products like BigQuery and Looker. That means it will be inside tools millions of businesses already have. The people who learn to ask good questions now will be ready when it ships.