Back to Supabase in Google Sheets
SheetXAI logo
Supabase logo
Supabase · Google Sheets Guide

Run a Read-Only SQL Query on Supabase for a Weekly Product Analytics Sheet

2026-05-13
4 min read
See the Excel version →

The Scenario

You are a product manager at a SaaS company. Every Monday at 9 AM your growth meeting starts with a weekly active users breakdown — new signups, returning users, and WAU by country.

The data is in your Supabase database: a users table and a sessions table. Your engineering team does not want to give you direct database access, but they have given you a read-only Supabase API key that can run SELECT queries.

The bad version of every Monday:

  • You message the data engineer on Sunday night asking for the WAU numbers
  • He checks Slack at 8:45 AM and sends a CSV at 8:58 AM
  • You paste it into a sheet and reformat it in the two minutes before the meeting
  • You walk in with the wrong week's numbers because the CSV had last week's filter.

The fast version is one prompt in SheetXAI.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your spreadsheet that runs read-only SQL against your Supabase project, so you get the product analytics you need without a data engineer handoff.

Open the SheetXAI sidebar and type:

Run a read-only SQL query on Supabase project abc123: SELECT DATE_TRUNC('week', created_at) AS week, COUNT(DISTINCT user_id) AS new_users FROM users WHERE created_at >= NOW() - INTERVAL '8 weeks' GROUP BY week ORDER BY week — write results into this sheet with headers: Week, New Users.

SheetXAI runs the query and writes the results into the sheet — header row included, sorted by week.

What You Get

A formatted WAU table ready for the growth meeting:

  • One row per week — Week and New Users columns
  • Last 8 weeks of data — the right window for the Monday review
  • Clean date values — truncated to week, not raw timestamps

You run this yourself on Monday morning. No data engineer handoff, no CSV, no reformatting.

What If the Query Needs More Context

Weekly new user counts are the starting point. SheetXAI can run more complex product analytics in the same prompt.

When you need WAU broken down by country

The growth meeting wants to know which markets are growing fastest.

Run a read-only SQL query on Supabase project abc123: SELECT DATE_TRUNC('week', s.created_at) AS week, u.country, COUNT(DISTINCT s.user_id) AS wau FROM sessions s JOIN users u ON s.user_id = u.id WHERE s.created_at >= NOW() - INTERVAL '4 weeks' GROUP BY week, country ORDER BY week, wau DESC — write results into this sheet.

When you need new signups vs returning users

The WAU breakdown should split first-time and returning sessions.

Run a read-only SQL on Supabase project abc123 that counts new users (first session ever) and returning users (more than one session in the period) per week for the last 8 weeks. Write week, new users, and returning users into this sheet.

When you want to filter to a specific pricing plan

The growth meeting focuses on paid plan WAU, not free trial activity.

Run a read-only SQL on Supabase project abc123 that counts weekly active users from the last 8 weeks — filter to only users with plan = 'pro' or plan = 'enterprise' in the users table. Write week and active paid users into this sheet.

When you need the full Monday morning snapshot in one shot

New signups, WAU by country, paid vs trial breakdown, and a one-sentence weekly summary — all in one prompt.

Run read-only SQL queries on Supabase project abc123 to produce: (1) new signups per week for 8 weeks into the Signups tab, (2) WAU by country for the last 4 weeks into the Countries tab, (3) paid vs trial WAU for the last 8 weeks into the Plans tab. In cell A1 of the Summary tab, write one sentence describing the most notable change compared to the prior week.

The pattern: instead of waiting for a data engineer, you run the queries yourself with the exact filter and shape the meeting needs.

Try It

Get the 7-day free trial of SheetXAI and open any Google Sheet, then ask it to run a read-only SQL query against your Supabase project. The Supabase integration is included in every SheetXAI plan. For related workflows, see how to run a cohort retention query or the Supabase in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more