Home › Browse

Generate a regex or SQL query: how to do it with AI

Last checked 2026-10-15

BeginnerBot with human review 💻 Coding

Describe what you need and get a tested pattern or query.

1. Bot automation level

Bot with human review The bot does the work, but facts, numbers or code should be checked.

2. Before you hand it to the bot

3. Copy-paste prompts

Main prompt
Write a SQL query that returns monthly active users from events(user_id, ts).
Beginner-friendly
Write a SQL query that returns monthly active users from events(user_id, ts).

I'm new to this: explain each step in plain words and ask me for anything you need before starting.
Check-your-work
Write a SQL query that returns monthly active users from events(user_id, ts).

When you finish, list any assumptions you made, anything you're unsure about, and what I should double-check before using the result.

Free tiers that can handle this (verified): ChatGPT (incl. Work & Codex), GitHub Copilot, Mistral Le Chat. Others: check plan.

4. Step-by-step

  1. Paste the table schema (columns, types) and a few sample rows.
  2. State the database (Postgres, MySQL, BigQuery) and the exact result you want.
  3. Ask for the query plus an explanation of each clause.
  4. Run it on a small sample and check results by hand.
  5. Check performance on large tables (indexes, limits).

5. Which bots and plans can do it

ToolWhat's different herePlan limitsSource
Claude (incl. Claude Code)Explains and writes SQL; Claude Code can run it locally.Claude Code and Research need Pro or higher; computer use is Pro/Max only (research preview).code.claude.com/docs/en/desktop
ChatGPT (incl. Work & Codex)Explains and writes SQL in chat.Free tier has limited deep research, Codex and Work; scheduled tasks need Go or higher (per chatgpt.com/pricing).help.openai.com/en/articles/20001275-chatgpt-work-and-codex
Cursor—Pricing page unverified; cloud agents require a connected source-control repo.cursor.com/docs/agent/overview
GitHub CopilotInline suggestions in editors including SQL Server Management Studio.Free: 2,000 completions + 50 chats; cloud agent listed on paid plans.docs.github.com/en/copilot/concepts/agents/cloud-agent/about-cloud-agent
Mistral Le Chat—Free tier has limited messages, searches and coding sessions; Pro raises limits.mistral.ai/pricing
DeepSeekFree chat; verify dialect.Chat app limits not documented officially; API is pay-per-token.api-docs.deepseek.com/quick_start/pricing

Free or paid?

6. Risks and what to double-check

Professions that use this

Data analyst

Related tasks

Open in the interactive app