db.l3.ai

Play

lessons

What Changed In 19

Upsert Drills

editor

engine: not started

results

Run a query to see rows here.

check

The invoice table

A startup stored invoices as inv(id text, amount float8, created timestamp, status text, customer text) with duplicate rows and no keys. Make id the primary key, amount numeric(12,2) (rounded), created timestamptz (the old values are UTC), status one of open|paid|void, customer required, keep all distinct invoices. Seven hidden checks.

task

Migrate the table so all hidden checks pass without losing data.

hints