Video
PostgreSQL in Tablux: a revenue query, then an AI question
A 27-second clip of Tablux on a Mac connected to PostgreSQL: Insights opens first, then a hand-typed monthly revenue query runs, and Tablux AI turns “Which products had the most refunds in the last 6 months?” into SQL that goes into the editor and runs.
The query typed in the video
Orders and revenue per month, newest first. to_char keeps the month readable; GROUP BY 1 groups by the first column.
SELECT to_char(date_trunc('month', ordered_at), 'YYYY-MM') AS month,
count(*) AS orders,
round(sum(total), 2) AS revenue
FROM shop.orders
GROUP BY 1
ORDER BY 1 DESC
LIMIT 12;The question for Tablux AI
The question, in everyday words: “Which products had the most refunds in the last 6 months?”
The reply: Counting refunds per product since six months ago:
SELECT p.name, count(*) AS refunds, round(sum(r.amount), 2) AS refunded
FROM shop.refunds r
JOIN shop.products p ON p.id = r.product_id
WHERE r.refunded_at >= now() - interval '6 months'
GROUP BY p.name
ORDER BY refunds DESC
LIMIT 10;“Use in editor” puts the query in the editor; Run runs it. Nothing runs by itself.
What came back
The Ridgeline 2P tent stands out with 231 refunds, more than ten times the next product: the demo data has a zipper fault on that tent in July. That is the kind of thing a question in everyday words finds faster than browsing tables.
How this was recorded
Everything in the clip is the real app on a Mac, connected to a real PostgreSQL 16 server holding the Trailhead Outfitters demo shop (two years of orders, products, customers and refunds). The typed query and the AI’s query both ran against that data; the result grids are what came back. The one thing staged is the AI’s reply: the recording can’t call Tablux AI live, so it shows a fixed answer of the kind Tablux AI gives, written for this schema.
Try it
Tablux is free on the App Store for iPhone, iPad and Mac, with two connections of your own and 5 AI questions a month. Tablux Pro ($9.99 a month, or $79.99 a year with a 7-day free trial) adds unlimited connections, SSH tunnels and 200 AI questions a month. The assistant sees your schema (table and field names, types, keys), never your rows, and its query only runs when you tap Run.
Questions
Can I connect to the database in this video?
The same Trailhead data is on a read-only hosted PostgreSQL demo anyone can connect to: the details are on the demo page.