Everything you need to follow along with the newsletter. Each block has a copy button. Paste it straight into the Supabase SQL editor and run it.
If you get stuck, hit reply to the email. I read every one.
This creates a simple tickets table (like an IT help desk would use) and adds five sample tickets. Copy the whole block and run it once.
create table tickets (
id int primary key,
title text,
status text, -- open / in_progress / closed
priority text, -- low / medium / high
agent text,
created_at date
);
insert into tickets (id, title, status, priority, agent, created_at) values
(1, 'VPN not connecting', 'open', 'high', 'Sara', '2026-06-01'),
(2, 'Password reset', 'closed', 'low', 'Mike', '2026-06-02'),
(3, 'Laptop won''t boot', 'in_progress', 'high', 'Sara', '2026-06-03'),
(4, 'Printer offline', 'open', 'medium', 'Mike', '2026-06-03'),
(5, 'Email sync failing', 'open', 'high', 'Sara', '2026-06-04');
You should see a success message, and your tickets table now holds five rows.
Run these one at a time. Each one adds a single new idea.
select means “show me.” The * means “all columns.” So this reads the whole table. That’s it, that’s a query.
select * from tickets;
Instead of *, you name the columns you want. Now you get just those two. Same data, less noise.
select title, status from tickets;
where keeps only the rows that match a condition. Query 2 chose which columns to show. This chooses which rows. Only the open tickets come back.
select * from tickets where status = 'open';