Database Viewer

Browse the SQL that builds any database used across the lessons, without running it.

Loaded: Lesson 6 database ยท aggregation-intro.database-init

CREATE TABLE orders (
  id SERIAL PRIMARY KEY,
  status TEXT NOT NULL,
  city TEXT NOT NULL,
  total_cents INTEGER NOT NULL
);


INSERT INTO orders (status, city, total_cents)
VALUES
  ('paid', 'London', 4200),
  ('paid', 'London', 1800),
  ('paid', 'Paris', 2400),
  ('pending', 'Berlin', 900),
  ('refunded', 'Paris', 2400);