Home · Business · IT, Data & Security · Data analysis & reporting

PARTLY

As of 13 August 2026, AI can only partly write SQL queries for your business report.

This still needs a person who signs their name to it.

Can you do it?

5 minutesto a draft.

30 minutesto something you’d act on.

Cost, all in£0

Skill neededchat-fluent

Who has to check ita colleague

What the alternative costsThe available tool data does not give a price for a human SQL consultant or another alternative.

If this goes wrong: the query gives a plausible but incorrect figure, and the report leads people to make a decision using it.

What to actually do

  1. Hand it to a person

    The route this page recommends

    A person who owns the outcome does this end to end, worth it when the failure is dear.

  2. Use a tool built for this

    Second choice
  3. Do it yourself

    The distant third

    A chat interface, chat-fluent skill, and roughly 30 minutes until you can act on the result.

    How to actually do it

    1. Open your database documentation, query editor or data catalogue and copy the definitions of the relevant tables and columns, including data types, keys and relationships.
    2. Write the reporting question in plain English, including the date range, time zone, grouping, exclusions, status rules and the exact figures the report needs.
    3. Prepare a small set of non-sensitive sample rows and a result you already know, or agree one with the report owner, without pasting personal or confidential data into a public chatbot.
    4. Paste the schema, database engine, business rules and sample test case into the prompt, then ask the model to identify ambiguities before producing SQL.
    5. Run the query in a read-only connection or a test environment, and compare its row counts, totals and date boundaries with the known test result.
    6. Ask a data owner or experienced SQL colleague to check every join, filter and calculation against the reporting definition before using the query in the live report.
    7. Run the approved query against the intended reporting period, save the SQL with its assumptions and record which checks were completed before sending the report.

    Prompt

    Write a SQL query for this business reporting task.
    
    Database engine and version: [for example, PostgreSQL, MySQL, SQL Server or BigQuery]
    
    Reporting question: [state exactly what the report must show]
    
    Tables and columns:
    [ paste the relevant CREATE TABLE statements or schema here ]
    
    Column meanings and relationships:
    [ explain what each relevant field means, which columns identify a record, and how tables should be joined ]
    
    Required filters and date rules:
    [ state the date range, time zone, status rules and exclusions ]
    
    Required output:
    [ list the columns, calculations, grouping, sorting and whether you need detail rows or totals ]
    
    Known result for a small test case, if available:
    [ paste a few non-sensitive sample rows and the expected result ]
    
    Use only the tables and columns provided. Do not invent fields, relationships or business rules. Ask concise questions before writing the query if any requirement is ambiguous. Then provide:
    1. The SQL query in one code block.
    2. A short explanation of each join, filter and calculation.
    3. A small test query or test procedure I can use to check the result.
    4. Any assumptions that I must confirm with the data owner.
    Do not modify data, create tables or use DELETE, UPDATE, INSERT or DROP statements.

    Open it prefilled in ChatGPT or Claude, or copy it into Gemini, which takes no prefill link.

What it gets wrong

  • AI cannot know what a field means when the schema is incomplete or the business definition is disputed.
  • AI cannot reliably detect that a join duplicates records unless you test row counts and totals against the source data.
  • AI cannot access your database unless you provide an authorised connection or the relevant schema and sample data.
  • AI cannot take responsibility for a misleading figure sent to management, customers or regulators.
  • AI cannot replace a data owner who decides which statuses, dates and exclusions the report should use.

What caps this at PARTLY: judgement under ambiguity, verification cost and private data access.

How we scored this

Five axes, each scored nought to two by hand: ten means AI carries the task cleanly, and the thresholds that turn a total into YES, PARTLY or NO are published in the methodology. Each axis name links to its definition.

AxisScore (0–2)
Output2
Inputs1
Verification1
Liability1
Effort delta2
Total7 / 10

FAQ

Can ChatGPT write SQL for me?
Yes, it can draft SQL when you provide the database type, table schema and precise reporting rules. Run it in a read-only environment and have a data owner check the joins and calculations before using the result.
Can AI write SQL without knowing my database schema?
It can guess a query, but the result may use columns, relationships or date logic that do not exist in your database. Give it the relevant schema and ask it to list assumptions instead of inventing missing details.
Is it safe to paste my business data into an AI tool?
Do not paste personal, confidential or commercially sensitive rows into a public chatbot unless your organisation has approved that use and the tool's data handling is suitable. Use table definitions and anonymised sample rows where possible, and use an authorised read-only connection for testing.
How do I check an AI-generated SQL query?
Run it against a test or read-only connection and compare row counts, totals, date boundaries and a few known records with an independently checked result. An experienced SQL colleague or data owner should also confirm that the business meaning of every join and filter is correct.

Nearby answers

Assessed by gpt-5.6-luna (gpt-5.6-luna) on 2026-08-13, second-checked by an independent model. Wrong somewhere? Email [email protected] and it gets re-checked.

The newsletter

AI news, new answers and product picks, straight to your inbox.