Smarter Week

How to automate it

How to automate “write queries and formulas to pull the data I need”

Here is the best way to spend less time on this, best first. Each comes with steps you can follow today and, for AI fixes, a prompt to copy.

45 min
typically, a few times a week
60%
of the time can be automated
Easy
to set up

Fix 1 of 1

AI

Have AI write and explain the query

Describe the tables and the question; AI writes the SQL or formula and explains it. You test it on a small sample before trusting the numbers.

Typically saves about 45% of the time5 min to set up
  1. 1Paste table and column names only, never the data itself or credentials.
  2. 2Describe the result you want in plain words.
  3. 3Run the query on a small date range and check a few rows by hand.
  4. 4Save working queries in a shared library.
Prompt to copy
I use [DATABASE: Postgres / SQL Server / BigQuery / Snowflake]. Tables: [TABLE NAME (columns)] ... I need [WHAT YOU WANT, e.g. weekly count of orders by region for the last 12 weeks, excluding cancelled]. Write the query, explain each part in one line, and list any assumptions about joins or nulls.

Tools: ChatGPT, Claude, Gemini or Microsoft Copilot · GitHub Copilot · Built-in AI in BigQuery, Snowflake or Databricks

Quick wins

Have you tried…

Have you asked AI to write or fix a SQL query or complex formula?
Describe your tables and what you want in plain words, and AI writes the query and explains it. You test it on a small sample first.

Who does this task

Roles in our library that list this as one of their common tasks. Each guide covers the rest of that role’s week.

HourLeak · the 8-minute work audit

How many hours does this cost you?

The free 8-minute check works out where your week goes and gives you your top fixes. The team scan does the same for everyone and adds it up, so you know which leaks to fix first.

Answers are anonymous. Leaders only see team totals.

Other common tasks for Business analysts