Database Viewer
Browse the SQL that builds any database used across the lessons, without running it.
Loaded: Lesson 14 database ยท advanced-aggregation.database-init
CREATE TABLE payments (
id SERIAL PRIMARY KEY,
status TEXT NOT NULL,
amount_cents INTEGER NOT NULL,
created_at TIMESTAMP NOT NULL
);
INSERT INTO payments (status, amount_cents, created_at)
VALUES
('paid', 1000, TIMESTAMP '2026-01-01 10:00'),
('paid', 2500, TIMESTAMP '2026-01-01 11:00'),
('failed', 2500, TIMESTAMP '2026-01-01 12:00'),
('paid', 3000, TIMESTAMP '2026-01-02 10:00'),
('refunded', 1000, TIMESTAMP '2026-01-02 11:00');