LE PETIT JOURNAL
THE CLERK'S HANDBOOK

The bakery database

Every example in this handbook runs on this one small, invented database, so you only have to learn its tables once.

The bakery sells twenty products and keeps six tables. They record four weeks of trade, from Monday 2 March to Sunday 29 March 2026; the shop is closed on Fridays.

TableColumnsOne row is
customerid, name, town, joined, referred_by, emaila regular customer; referred_by is the id of the customer who recommended the shop, or NULL; email is as the customer wrote it (some in capitals or with a stray space), or NULL
productid, name, category, pricesomething on sale: bread, pastry or cake, today's price in euros
staffid, name, role, manager_idsomeone who works at the bakery; manager_id is the id of their manager, NULL for the owner
ordersid, customer_id, day, time, staff_idone visit to the counter; day is YYYY-MM-DD, time is HH:MM, staff_id who served it
order_itemorder_id, product_id, quantity, unit_priceone line of an order: how many of one product, at the price paid that day (three products cost more from Monday 16 March)
refundid, order_id, day, amount, reasonmoney given back on an order, in euros; reason may be NULL

The ids link the tables: each order line points to its order and its product, each order to its customer and to the member of staff who served it, each refund to its order, a customer to the customer who referred them, and a member of staff to their manager. The schema draws those links: a gold key marks each primary key, a silver one each foreign key, and every line runs from a foreign key (N, many rows can share a value) to the key it points to (1). The loop beside customer is referred_by, and the one beside staff is manager_id: each points back into its own table.

primary key foreign key 1None-to-many

A few rows of the four larger tables (staff and refund are short enough to read whole with SELECT *):

SELECT * FROM customer ORDER BY id LIMIT 3;
idnametownjoinedreferred_byemail
1Alice TurnerRiverside2024-01-15NULLalice.turner@mail.com
2Ben OkaforHillcrest2024-02-031Ben.Okafor@Mail.com
3Chloe MartinRiverside2024-02-201chloe.martin@post.net
SELECT * FROM product ORDER BY id LIMIT 3;
idnamecategoryprice
1Baguettebread1.2
2Sourdough loafbread4.5
3Rye loafbread3.8
SELECT * FROM orders ORDER BY id LIMIT 3;
idcustomer_iddaytimestaff_id
112026-03-0207:152
292026-03-0207:553
322026-03-0208:403
SELECT * FROM order_item ORDER BY order_id, product_id LIMIT 3;
order_idproduct_idquantityunit_price
1121.2
1411.4
2713.9

The full database is forty customers, twenty products, six staff, 303 orders, 680 order lines and eight refunds. To run the examples yourself, paste this script into any SQLite tool (the sqlite3 command line, DB Browser for SQLite, or an online SQLite playground), then try each query from the pages below. The examples follow the rules of this site's terminal, and plain SQLite differs from it in one place that matters for them: there LIKE ignores case and ILIKE does not exist, so write lower(name) LIKE '%croissant%' instead of ILIKE.

The bakery database as a SQLite script
CREATE TABLE customer (id INTEGER PRIMARY KEY, name TEXT, town TEXT, joined TEXT, referred_by INTEGER REFERENCES customer(id), email TEXT);
CREATE TABLE product (id INTEGER PRIMARY KEY, name TEXT, category TEXT, price REAL);
CREATE TABLE staff (id INTEGER PRIMARY KEY, name TEXT, role TEXT, manager_id INTEGER REFERENCES staff(id));
CREATE TABLE orders (id INTEGER PRIMARY KEY, customer_id INTEGER REFERENCES customer(id), day TEXT, time TEXT, staff_id INTEGER REFERENCES staff(id));
CREATE TABLE order_item (order_id INTEGER REFERENCES orders(id), product_id INTEGER REFERENCES product(id), quantity INTEGER, unit_price REAL);
CREATE TABLE refund (id INTEGER PRIMARY KEY, order_id INTEGER REFERENCES orders(id), day TEXT, amount REAL, reason TEXT);
INSERT INTO customer VALUES
 (1,'Alice Turner','Riverside','2024-01-15',NULL,'alice.turner@mail.com'),
 (2,'Ben Okafor','Hillcrest','2024-02-03',1,'Ben.Okafor@Mail.com'),
 (3,'Chloe Martin','Riverside','2024-02-20',1,'chloe.martin@post.net'),
 (4,'David Chen','Old Town','2024-03-11',NULL,NULL),
 (5,'Emma Novak','Hillcrest','2024-04-02',3,'emma.novak@post.net '),
 (6,'Farid Haddad','Old Town','2024-05-19',5,'FARID.HADDAD@MAIL.COM'),
 (7,'Grace Lee','Riverside','2024-06-07',2,'grace.lee@mail.com'),
 (8,'Hugo Silva','Hillcrest','2024-07-23',NULL,NULL),
 (9,'Daniel Moreno','Hillcrest','2024-08-10',7,'daniel.moreno@mail.com'),
 (10,'Kofi Tanaka','Hillcrest','2024-09-03',NULL,NULL),
 (11,'Quentin Schmidt','Riverside','2024-09-04',10,NULL),
 (12,'Wen Petrov','Old Town','2024-10-05',6,NULL),
 (13,'Ugo Dubois','Hillcrest','2024-11-09',5,'ugo.dubois@webmail.org'),
 (14,'Zoe Garcia','Hillcrest','2025-01-01',7,'zoe.garcia@webmail.org'),
 (15,'Hassan Ivanova','Old Town','2025-02-04',3,'hassan.ivanova@post.net'),
 (16,'Rosa Weber','Old Town','2025-02-21',15,'Rosa.Weber@Post.Net'),
 (17,'Nadia Jensen','Hillcrest','2025-04-23',3,'nadia.jensen@webmail.org'),
 (18,'Priya Hughes','Riverside','2025-04-24',10,'priya.hughes@webmail.org'),
 (19,'Marco Olsen','Riverside','2025-05-03',2,'marco.olsen@mail.com'),
 (20,'Oscar Nakamura','Riverside','2025-05-25',18,'oscar.nakamura@mail.com'),
 (21,'Jonas Eriksen','Hillcrest','2025-05-29',7,'jonas.eriksen@post.net'),
 (22,'Stefan Lambert','Old Town','2025-06-21',NULL,'stefan.lambert@post.net'),
 (23,'Tara Rossi','Riverside','2025-08-04',3,'tara.rossi@webmail.org '),
 (24,'Amira Kowalski','Old Town','2025-10-10',7,'amira.kowalski@mail.com'),
 (25,'Bruno Fischer','Old Town','2025-10-19',15,'bruno.fischer@mail.com'),
 (26,'Iris Costa','Old Town','2025-10-23',NULL,NULL),
 (27,'Zoe Garcia','Riverside','2025-11-07',NULL,'zoe_garcia@mail.com'),
 (28,'Vera Bianchi','Old Town','2025-11-12',1,NULL),
 (29,'Yusuf Eriksen','Old Town','2025-11-13',27,' yusuf.eriksen@mail.com'),
 (30,'Felix Bianchi','Old Town','2025-11-21',20,NULL),
 (31,'Greta Rossi','Hillcrest','2025-12-04',3,'greta.rossi@mail.com'),
 (32,'Lena Dubois','Hillcrest','2025-12-11',23,'lena.dubois@post.net'),
 (33,'Elena Nakamura','Riverside','2025-12-15',18,'elena.nakamura@post.net'),
 (34,'Greta Hughes','Riverside','2025-12-23',27,'greta.hughes@mail.com'),
 (35,'Marco Costa','Hillcrest','2026-01-06',3,'marco.costa@webmail.org'),
 (36,'Iris Olsen','Riverside','2026-01-10',34,NULL),
 (37,'Lena Schmidt','Old Town','2026-01-18',7,'lena.schmidt@webmail.org'),
 (38,'Vera Tanaka','Old Town','2026-03-06',10,NULL),
 (39,'Yusuf Moreno','Old Town','2026-03-13',38,'yusuf.moreno@mail.com'),
 (40,'Quentin Jensen','Riverside','2026-03-17',15,'quentin.jensen@mail.com');
INSERT INTO product VALUES
 (1,'Baguette','bread',1.20),
 (2,'Sourdough loaf','bread',4.50),
 (3,'Rye loaf','bread',3.80),
 (4,'Croissant','pastry',1.40),
 (5,'Pain au chocolat','pastry',1.60),
 (6,'Almond croissant','pastry',2.20),
 (7,'Lemon tart','cake',3.90),
 (8,'Chocolate eclair','cake',2.80),
 (9,'Carrot cake slice','cake',3.20),
 (10,'Seeded rolls','bread',3.80),
 (11,'Brioche','pastry',2.10),
 (12,'Focaccia','bread',3.60),
 (13,'Cinnamon roll','pastry',2.60),
 (14,'Apple turnover','pastry',1.90),
 (15,'Cheesecake slice','cake',3.80),
 (16,'Walnut bread','bread',4.20),
 (17,'Raspberry tart','cake',4.10),
 (18,'Coffee eclair','cake',2.80),
 (19,'Pistachio financier','cake',2.40),
 (20,'Hot cross bun','pastry',1.50);
INSERT INTO staff VALUES
 (1,'Margaret Hale','owner',NULL),
 (2,'Tom Becker','head baker',1),
 (3,'Nina Patel','counter',2),
 (4,'Omar Reyes','counter',2),
 (5,'Lucy Brandt','counter',2),
 (6,'Sam Ito','baker',2);
INSERT INTO orders VALUES
 (1,1,'2026-03-02','07:15',2),(2,9,'2026-03-02','07:55',3),(3,2,'2026-03-02','08:40',3),
 (4,5,'2026-03-02','09:25',3),(5,22,'2026-03-02','09:40',3),(6,6,'2026-03-02','10:50',1),
 (7,4,'2026-03-02','12:30',4),(8,28,'2026-03-02','12:45',4),(9,14,'2026-03-02','12:50',4),
 (10,28,'2026-03-02','13:00',4),(11,12,'2026-03-02','13:20',4),(12,9,'2026-03-02','16:50',4),
 (13,1,'2026-03-02','17:25',4),(14,18,'2026-03-03','07:10',2),(15,30,'2026-03-03','07:45',3),
 (16,3,'2026-03-03','07:50',3),(17,23,'2026-03-03','08:40',3),(18,28,'2026-03-03','11:20',3),
 (19,29,'2026-03-03','11:40',3),(20,28,'2026-03-03','12:15',4),(21,11,'2026-03-03','13:25',4),
 (22,3,'2026-03-03','15:50',4),(23,4,'2026-03-03','17:30',4),(24,1,'2026-03-04','07:20',2),
 (25,17,'2026-03-04','08:35',3),(26,7,'2026-03-04','08:40',3),(27,1,'2026-03-04','08:45',3),
 (28,12,'2026-03-04','09:00',3),(29,28,'2026-03-04','09:10',1),(30,6,'2026-03-04','10:30',3),
 (31,36,'2026-03-04','11:05',3),(32,5,'2026-03-04','12:15',4),(33,5,'2026-03-04','16:10',4),
 (34,18,'2026-03-05','07:30',3),(35,36,'2026-03-05','08:45',3),(36,6,'2026-03-05','09:05',3),
 (37,2,'2026-03-05','09:40',3),(38,36,'2026-03-05','11:40',3),(39,29,'2026-03-05','13:50',4),
 (40,16,'2026-03-05','14:20',4),(41,4,'2026-03-05','16:30',4),(42,11,'2026-03-05','16:55',4),
 (43,2,'2026-03-05','17:45',4),(44,3,'2026-03-05','18:45',4),(45,1,'2026-03-07','07:10',5),
 (46,11,'2026-03-07','08:10',5),(47,18,'2026-03-07','08:20',1),(48,16,'2026-03-07','08:50',5),
 (49,4,'2026-03-07','09:30',1),(50,36,'2026-03-07','09:40',5),(51,7,'2026-03-07','10:30',5),
 (52,34,'2026-03-07','11:05',5),(53,12,'2026-03-07','12:35',5),(54,4,'2026-03-07','13:15',5),
 (55,28,'2026-03-07','13:35',5),(56,30,'2026-03-07','16:55',5),(57,11,'2026-03-07','18:15',5),
 (58,18,'2026-03-07','18:30',5),(59,37,'2026-03-08','07:45',5),(60,3,'2026-03-08','08:05',5),
 (61,23,'2026-03-08','08:30',5),(62,34,'2026-03-08','08:40',1),(63,30,'2026-03-08','09:00',5),
 (64,29,'2026-03-08','10:00',5),(65,33,'2026-03-08','10:15',5),(66,36,'2026-03-08','11:10',5),
 (67,11,'2026-03-08','11:15',1),(68,5,'2026-03-08','11:40',1),(69,21,'2026-03-08','12:40',5),
 (70,2,'2026-03-08','15:05',1),(71,29,'2026-03-08','16:10',5),(72,12,'2026-03-08','16:45',5),
 (73,1,'2026-03-08','17:05',5),(74,1,'2026-03-08','18:20',5),(75,21,'2026-03-09','07:15',2),
 (76,10,'2026-03-09','07:45',3),(77,17,'2026-03-09','08:10',3),(78,25,'2026-03-09','08:20',3),
 (79,10,'2026-03-09','08:55',3),(80,30,'2026-03-09','09:50',3),(81,22,'2026-03-09','12:00',4),
 (82,3,'2026-03-09','14:55',4),(83,28,'2026-03-09','15:30',4),(84,17,'2026-03-09','16:35',4),
 (85,24,'2026-03-09','17:20',4),(86,29,'2026-03-09','17:35',4),(87,5,'2026-03-10','07:50',3),
 (88,20,'2026-03-10','08:05',3),(89,4,'2026-03-10','09:30',3),(90,11,'2026-03-10','10:00',3),
 (91,25,'2026-03-10','10:05',3),(92,28,'2026-03-10','10:25',3),(93,2,'2026-03-10','12:20',4),
 (94,10,'2026-03-10','13:00',4),(95,30,'2026-03-10','13:40',4),(96,18,'2026-03-10','14:10',4),
 (97,28,'2026-03-10','15:30',1),(98,11,'2026-03-10','17:05',4),(99,9,'2026-03-10','17:40',4),
 (100,2,'2026-03-11','07:45',3),(101,5,'2026-03-11','08:00',3),(102,20,'2026-03-11','08:05',3),
 (103,5,'2026-03-11','08:25',3),(104,14,'2026-03-11','08:30',3),(105,36,'2026-03-11','08:55',3),
 (106,5,'2026-03-11','09:35',3),(107,22,'2026-03-11','10:45',3),(108,20,'2026-03-11','10:50',3),
 (109,9,'2026-03-11','15:30',4),(110,36,'2026-03-12','07:10',2),(111,9,'2026-03-12','07:30',3),
 (112,5,'2026-03-12','07:45',1),(113,28,'2026-03-12','08:15',3),(114,15,'2026-03-12','09:55',3),
 (115,4,'2026-03-12','10:50',3),(116,7,'2026-03-12','12:00',4),(117,10,'2026-03-12','16:35',4),
 (118,30,'2026-03-12','17:20',4),(119,7,'2026-03-12','17:25',4),(120,11,'2026-03-14','07:00',5),
 (121,4,'2026-03-14','07:25',5),(122,15,'2026-03-14','07:40',5),(123,5,'2026-03-14','08:15',5),
 (124,28,'2026-03-14','09:00',5),(125,39,'2026-03-14','09:05',1),(126,5,'2026-03-14','09:10',5),
 (127,25,'2026-03-14','12:00',5),(128,2,'2026-03-14','12:30',5),(129,2,'2026-03-14','14:15',5),
 (130,3,'2026-03-14','14:45',5),(131,1,'2026-03-14','14:55',5),(132,28,'2026-03-14','16:55',1),
 (133,30,'2026-03-14','17:35',5),(134,30,'2026-03-14','18:00',5),(135,22,'2026-03-15','07:05',5),
 (136,1,'2026-03-15','07:40',5),(137,11,'2026-03-15','08:55',5),(138,28,'2026-03-15','09:50',5),
 (139,11,'2026-03-15','10:15',5),(140,32,'2026-03-15','10:20',5),(141,23,'2026-03-15','10:40',5),
 (142,39,'2026-03-15','11:10',5),(143,7,'2026-03-15','12:25',5),(144,33,'2026-03-15','12:40',5),
 (145,37,'2026-03-15','12:55',5),(146,36,'2026-03-15','13:00',5),(147,3,'2026-03-15','14:50',5),
 (148,15,'2026-03-15','15:50',5),(149,6,'2026-03-15','16:30',5),(150,4,'2026-03-15','18:35',5),
 (151,25,'2026-03-16','07:30',3),(152,15,'2026-03-16','08:00',3),(153,12,'2026-03-16','08:15',3),
 (154,21,'2026-03-16','08:40',3),(155,36,'2026-03-16','08:45',3),(156,7,'2026-03-16','09:20',3),
 (157,5,'2026-03-16','09:35',3),(158,1,'2026-03-16','10:00',3),(159,4,'2026-03-16','10:50',3),
 (160,21,'2026-03-16','11:35',3),(161,13,'2026-03-16','12:30',4),(162,4,'2026-03-16','12:45',4),
 (163,38,'2026-03-16','16:35',4),(164,30,'2026-03-17','07:30',3),(165,9,'2026-03-17','07:45',3),
 (166,28,'2026-03-17','08:05',1),(167,32,'2026-03-17','08:10',3),(168,36,'2026-03-17','08:15',3),
 (169,24,'2026-03-17','08:45',3),(170,12,'2026-03-17','09:45',3),(171,37,'2026-03-17','10:05',1),
 (172,11,'2026-03-17','12:15',4),(173,3,'2026-03-17','13:40',4),(174,40,'2026-03-17','17:05',4),
 (175,32,'2026-03-18','07:35',3),(176,12,'2026-03-18','08:05',3),(177,7,'2026-03-18','08:50',3),
 (178,40,'2026-03-18','08:55',1),(179,5,'2026-03-18','09:25',3),(180,12,'2026-03-18','09:45',3),
 (181,11,'2026-03-18','11:25',3),(182,32,'2026-03-18','11:55',3),(183,9,'2026-03-18','12:45',4),
 (184,6,'2026-03-18','14:45',4),(185,21,'2026-03-18','15:10',1),(186,2,'2026-03-18','17:20',4),
 (187,29,'2026-03-19','07:25',2),(188,3,'2026-03-19','07:45',3),(189,4,'2026-03-19','09:20',3),
 (190,9,'2026-03-19','09:30',3),(191,40,'2026-03-19','09:35',3),(192,2,'2026-03-19','09:40',3),
 (193,9,'2026-03-19','10:20',3),(194,29,'2026-03-19','10:50',1),(195,36,'2026-03-19','11:35',3),
 (196,12,'2026-03-19','12:15',4),(197,1,'2026-03-19','12:45',4),(198,3,'2026-03-19','17:50',4),
 (199,28,'2026-03-19','17:55',4),(200,39,'2026-03-21','07:05',5),(201,4,'2026-03-21','07:50',5),
 (202,11,'2026-03-21','07:55',5),(203,30,'2026-03-21','08:00',5),(204,1,'2026-03-21','08:05',5),
 (205,24,'2026-03-21','08:30',5),(206,28,'2026-03-21','09:05',5),(207,39,'2026-03-21','09:40',5),
 (208,12,'2026-03-21','09:45',1),(209,7,'2026-03-21','11:00',5),(210,11,'2026-03-21','11:25',5),
 (211,1,'2026-03-21','12:00',5),(212,1,'2026-03-21','16:30',5),(213,20,'2026-03-21','17:55',5),
 (214,21,'2026-03-21','18:50',5),(215,28,'2026-03-22','07:05',5),(216,36,'2026-03-22','07:30',5),
 (217,30,'2026-03-22','07:35',5),(218,9,'2026-03-22','10:35',5),(219,30,'2026-03-22','10:45',5),
 (220,16,'2026-03-22','11:10',5),(221,23,'2026-03-22','11:40',5),(222,1,'2026-03-22','12:35',5),
 (223,5,'2026-03-22','12:55',5),(224,36,'2026-03-22','13:40',5),(225,39,'2026-03-22','14:15',5),
 (226,2,'2026-03-22','17:35',5),(227,39,'2026-03-22','18:20',5),(228,4,'2026-03-23','07:35',3),
 (229,30,'2026-03-23','07:40',3),(230,36,'2026-03-23','08:30',3),(231,1,'2026-03-23','08:55',1),
 (232,5,'2026-03-23','10:40',3),(233,4,'2026-03-23','11:35',3),(234,36,'2026-03-23','12:00',4),
 (235,9,'2026-03-23','12:45',4),(236,36,'2026-03-23','16:10',4),(237,1,'2026-03-23','17:00',4),
 (238,11,'2026-03-23','17:35',4),(239,4,'2026-03-23','18:00',4),(240,2,'2026-03-24','07:15',2),
 (241,7,'2026-03-24','07:25',2),(242,12,'2026-03-24','07:45',3),(243,40,'2026-03-24','08:40',3),
 (244,1,'2026-03-24','10:30',1),(245,21,'2026-03-24','11:00',3),(246,28,'2026-03-24','13:00',4),
 (247,7,'2026-03-24','15:35',4),(248,17,'2026-03-24','16:35',4),(249,3,'2026-03-24','17:15',4),
 (250,25,'2026-03-25','07:45',3),(251,15,'2026-03-25','08:00',3),(252,12,'2026-03-25','08:05',3),
 (253,9,'2026-03-25','08:45',3),(254,37,'2026-03-25','10:45',3),(255,3,'2026-03-25','14:05',4),
 (256,18,'2026-03-25','14:45',1),(257,16,'2026-03-25','16:05',4),(258,10,'2026-03-25','16:25',4),
 (259,39,'2026-03-25','17:15',4),(260,24,'2026-03-25','17:25',4),(261,30,'2026-03-25','17:30',4),
 (262,11,'2026-03-25','17:40',4),(263,9,'2026-03-26','07:00',2),(264,1,'2026-03-26','07:35',3),
 (265,24,'2026-03-26','07:55',3),(266,16,'2026-03-26','08:20',3),(267,23,'2026-03-26','08:45',3),
 (268,21,'2026-03-26','11:00',1),(269,11,'2026-03-26','13:45',4),(270,28,'2026-03-26','13:50',4),
 (271,5,'2026-03-26','14:00',4),(272,1,'2026-03-26','15:20',4),(273,9,'2026-03-26','16:05',4),
 (274,39,'2026-03-28','07:00',5),(275,34,'2026-03-28','07:55',5),(276,15,'2026-03-28','08:10',5),
 (277,7,'2026-03-28','08:25',5),(278,5,'2026-03-28','09:30',5),(279,6,'2026-03-28','10:15',5),
 (280,10,'2026-03-28','10:25',5),(281,18,'2026-03-28','12:40',5),(282,36,'2026-03-28','13:10',5),
 (283,2,'2026-03-28','13:50',5),(284,6,'2026-03-28','14:30',5),(285,16,'2026-03-28','15:50',5),
 (286,39,'2026-03-28','17:25',5),(287,11,'2026-03-28','17:55',5),(288,26,'2026-03-29','07:25',5),
 (289,27,'2026-03-29','07:30',5),(290,36,'2026-03-29','07:40',5),(291,13,'2026-03-29','09:05',1),
 (292,21,'2026-03-29','09:30',5),(293,11,'2026-03-29','10:40',5),(294,28,'2026-03-29','10:50',5),
 (295,24,'2026-03-29','11:05',5),(296,9,'2026-03-29','12:05',5),(297,29,'2026-03-29','13:20',5),
 (298,22,'2026-03-29','13:35',5),(299,36,'2026-03-29','13:40',5),(300,11,'2026-03-29','14:05',5),
 (301,9,'2026-03-29','16:00',5),(302,7,'2026-03-29','16:40',5),(303,2,'2026-03-29','17:45',5);
INSERT INTO order_item VALUES
 (1,1,2,1.20),(1,4,1,1.40),(2,16,2,4.20),(2,7,1,3.90),(2,14,1,1.90),(3,2,1,4.50),(3,5,2,1.60),(4,1,3,1.20),(4,13,2,2.40),(4,14,1,1.90),
 (5,2,2,4.50),(5,14,3,1.90),(6,11,1,2.10),(7,7,1,3.90),(7,8,2,2.80),(8,8,1,2.80),(8,17,2,4.10),(8,3,2,3.80),(9,9,2,3.20),(10,10,1,3.80),
 (10,17,3,4.10),(10,1,2,1.20),(10,12,1,3.40),(11,8,1,2.80),(11,2,1,4.50),(11,10,1,3.80),(11,16,1,4.20),(12,8,1,2.80),(12,17,2,4.10),(12,13,2,2.40),
 (12,14,2,1.90),(13,18,1,2.80),(13,5,1,1.60),(14,1,3,1.20),(14,14,1,1.90),(14,3,2,3.80),(15,6,1,2.20),(15,5,2,1.60),(15,9,1,3.20),(16,4,3,1.40),
 (17,3,1,3.80),(18,8,1,2.80),(18,6,1,2.20),(19,9,2,3.20),(19,17,1,4.10),(19,5,1,1.60),(20,16,1,4.20),(20,15,1,3.50),(21,12,1,3.40),(21,10,3,3.80),
 (21,1,2,1.20),(22,16,2,4.20),(23,9,1,3.20),(23,14,2,1.90),(24,1,1,1.20),(25,4,3,1.40),(26,12,2,3.40),(26,10,2,3.80),(26,4,1,1.40),(27,5,3,1.60),
 (27,18,2,2.80),(27,3,2,3.80),(28,10,1,3.80),(28,11,3,2.10),(28,14,2,1.90),(29,13,2,2.40),(29,16,1,4.20),(29,4,1,1.40),(30,4,2,1.40),(30,10,2,3.80),
 (31,16,1,4.20),(31,12,1,3.40),(31,13,1,2.40),(31,3,3,3.80),(32,9,1,3.20),(33,6,2,2.20),(33,7,1,3.90),(34,6,2,2.20),(34,5,1,1.60),(35,10,1,3.80),
 (36,3,1,3.80),(36,10,1,3.80),(37,6,1,2.20),(37,12,2,3.40),(38,2,1,4.50),(38,15,2,3.50),(39,16,2,4.20),(39,3,3,3.80),(40,2,1,4.50),(40,7,1,3.90),
 (40,8,3,2.80),(41,17,1,4.10),(41,4,3,1.40),(42,18,1,2.80),(42,12,2,3.40),(42,2,1,4.50),(43,2,1,4.50),(44,7,1,3.90),(44,18,2,2.80),(44,9,2,3.20),
 (45,1,2,1.20),(45,5,1,1.60),(46,6,2,2.20),(47,6,2,2.20),(47,10,1,3.80),(47,11,2,2.10),(48,13,1,2.40),(49,10,1,3.80),(49,18,2,2.80),(49,6,1,2.20),
 (50,13,2,2.40),(51,8,3,2.80),(52,2,2,4.50),(52,1,1,1.20),(52,18,1,2.80),(53,15,1,3.50),(53,2,1,4.50),(53,17,1,4.10),(54,2,1,4.50),(54,6,1,2.20),
 (55,17,1,4.10),(55,3,1,3.80),(55,1,1,1.20),(56,1,2,1.20),(57,7,3,3.90),(57,9,2,3.20),(58,3,1,3.80),(58,1,1,1.20),(58,17,1,4.10),(59,4,1,1.40),
 (59,5,3,1.60),(59,13,2,2.40),(60,4,2,1.40),(60,5,2,1.60),(61,1,1,1.20),(61,10,1,3.80),(62,13,1,2.40),(63,11,1,2.10),(63,16,1,4.20),(63,18,3,2.80),
 (64,8,1,2.80),(64,2,1,4.50),(65,1,1,1.20),(66,18,2,2.80),(66,3,1,3.80),(66,9,1,3.20),(66,16,1,4.20),(67,14,1,1.90),(67,2,3,4.50),(67,13,2,2.40),
 (68,7,2,3.90),(69,4,1,1.40),(69,18,1,2.80),(70,8,2,2.80),(70,18,1,2.80),(70,1,2,1.20),(71,18,2,2.80),(71,12,1,3.40),(72,13,1,2.40),(72,3,1,3.80),
 (73,15,2,3.50),(73,9,1,3.20),(74,1,1,1.20),(74,10,1,3.80),(75,16,2,4.20),(75,13,1,2.40),(76,12,1,3.40),(76,11,2,2.10),(76,10,1,3.80),(77,5,1,1.60),
 (78,11,1,2.10),(78,6,1,2.20),(78,10,1,3.80),(79,2,1,4.50),(80,10,2,3.80),(80,13,1,2.40),(80,12,1,3.40),(81,8,1,2.80),(81,5,1,1.60),(82,18,1,2.80),
 (82,6,2,2.20),(82,1,2,1.20),(83,14,2,1.90),(83,2,1,4.50),(83,15,1,3.50),(84,11,1,2.10),(84,12,1,3.40),(84,9,2,3.20),(85,14,1,1.90),(85,17,2,4.10),
 (86,1,1,1.20),(86,7,1,3.90),(87,11,1,2.10),(87,6,3,2.20),(87,12,1,3.40),(87,17,1,4.10),(88,1,1,1.20),(88,16,3,4.20),(88,13,1,2.40),(89,17,1,4.10),
 (89,12,1,3.40),(89,4,1,1.40),(90,16,1,4.20),(90,10,1,3.80),(90,11,2,2.10),(91,7,2,3.90),(91,10,2,3.80),(91,14,1,1.90),(92,10,1,3.80),(92,14,1,1.90),
 (92,7,1,3.90),(93,1,3,1.20),(93,7,3,3.90),(94,16,1,4.20),(94,1,1,1.20),(95,10,3,3.80),(95,4,2,1.40),(95,15,3,3.50),(96,13,2,2.40),(96,9,1,3.20),
 (97,13,2,2.40),(97,14,2,1.90),(98,17,2,4.10),(99,4,2,1.40),(99,14,1,1.90),(100,1,1,1.20),(100,6,1,2.20),(101,15,1,3.50),(101,5,2,1.60),(101,12,1,3.40),
 (102,3,1,3.80),(102,9,1,3.20),(102,16,1,4.20),(103,14,1,1.90),(104,3,1,3.80),(104,17,2,4.10),(104,10,1,3.80),(105,1,1,1.20),(105,2,2,4.50),(105,7,1,3.90),
 (106,12,1,3.40),(106,14,1,1.90),(107,12,2,3.40),(107,13,2,2.40),(108,5,1,1.60),(108,14,1,1.90),(108,16,1,4.20),(109,15,1,3.50),(109,6,1,2.20),(110,16,1,4.20),
 (110,14,2,1.90),(111,2,1,4.50),(111,4,2,1.40),(111,17,3,4.10),(112,5,2,1.60),(112,13,2,2.40),(113,18,3,2.80),(113,12,1,3.40),(114,6,2,2.20),(114,11,1,2.10),
 (115,8,2,2.80),(115,6,1,2.20),(115,10,1,3.80),(116,7,1,3.90),(116,17,1,4.10),(117,3,1,3.80),(118,15,1,3.50),(118,9,1,3.20),(118,2,1,4.50),(119,9,2,3.20),
 (119,15,1,3.50),(120,1,1,1.20),(120,15,1,3.50),(120,4,2,1.40),(121,14,2,1.90),(121,10,1,3.80),(122,1,1,1.20),(123,3,1,3.80),(123,14,3,1.90),(123,11,1,2.10),
 (124,16,1,4.20),(124,4,2,1.40),(124,2,1,4.50),(125,1,1,1.20),(126,15,1,3.50),(126,4,2,1.40),(127,3,1,3.80),(128,2,3,4.50),(129,17,1,4.10),(129,9,1,3.20),
 (130,17,1,4.10),(130,15,3,3.50),(131,7,3,3.90),(131,11,1,2.10),(132,7,2,3.90),(132,17,2,4.10),(133,9,1,3.20),(133,5,2,1.60),(134,5,1,1.60),(134,1,3,1.20),
 (134,8,1,2.80),(135,12,1,3.40),(135,3,1,3.80),(135,1,1,1.20),(136,9,1,3.20),(136,4,1,1.40),(137,16,1,4.20),(138,6,1,2.20),(138,10,1,3.80),(138,3,2,3.80),
 (139,10,1,3.80),(139,16,1,4.20),(139,1,2,1.20),(140,4,1,1.40),(141,1,1,1.20),(142,12,1,3.40),(142,18,1,2.80),(143,6,2,2.20),(143,8,1,2.80),(143,13,1,2.40),
 (144,18,2,2.80),(144,15,1,3.50),(144,8,2,2.80),(145,18,2,2.80),(145,12,1,3.40),(145,3,2,3.80),(146,12,1,3.40),(146,17,1,4.10),(147,9,1,3.20),(148,12,1,3.40),
 (149,7,2,3.90),(149,5,2,1.60),(149,8,1,2.80),(150,15,1,3.50),(150,4,1,1.40),(151,12,1,3.60),(152,16,1,4.20),(153,13,1,2.60),(154,5,1,1.60),(155,16,1,4.20),
 (155,10,3,3.80),(156,11,1,2.10),(157,20,2,1.50),(157,10,1,3.80),(158,15,3,3.80),(159,13,2,2.60),(160,16,1,4.20),(160,12,2,3.60),(160,1,2,1.20),(161,18,2,2.80),
 (161,1,1,1.20),(162,2,3,4.50),(162,4,2,1.40),(162,8,1,2.80),(163,9,1,3.20),(163,17,3,4.10),(163,5,2,1.60),(164,18,1,2.80),(164,1,1,1.20),(164,14,1,1.90),
 (165,16,1,4.20),(165,8,2,2.80),(165,6,1,2.20),(165,10,1,3.80),(166,7,1,3.90),(166,3,1,3.80),(167,4,2,1.40),(167,20,2,1.50),(168,6,3,2.20),(168,1,1,1.20),
 (169,16,2,4.20),(169,13,2,2.60),(169,4,1,1.40),(170,4,1,1.40),(171,12,2,3.60),(172,12,1,3.60),(172,16,1,4.20),(172,2,1,4.50),(172,18,1,2.80),(173,1,1,1.20),
 (173,7,2,3.90),(174,14,1,1.90),(174,8,2,2.80),(174,2,1,4.50),(174,18,1,2.80),(175,2,1,4.50),(175,12,2,3.60),(175,6,2,2.20),(176,11,2,2.10),(176,20,1,1.50),
 (177,2,1,4.50),(177,4,1,1.40),(177,5,1,1.60),(178,10,3,3.80),(179,14,1,1.90),(179,13,1,2.60),(179,20,2,1.50),(180,14,1,1.90),(180,1,1,1.20),(180,7,3,3.90),
 (181,10,1,3.80),(181,18,1,2.80),(182,3,2,3.80),(182,2,2,4.50),(182,15,2,3.80),(183,1,1,1.20),(184,11,1,2.10),(185,7,3,3.90),(185,15,2,3.80),(186,2,2,4.50),
 (186,7,3,3.90),(187,3,2,3.80),(187,15,1,3.80),(187,6,1,2.20),(187,13,1,2.60),(188,1,1,1.20),(188,11,2,2.10),(188,10,1,3.80),(189,2,1,4.50),(189,7,2,3.90),
 (189,14,1,1.90),(190,2,2,4.50),(190,8,1,2.80),(190,20,1,1.50),(191,11,1,2.10),(191,16,1,4.20),(191,1,1,1.20),(191,13,2,2.60),(192,3,2,3.80),(192,11,1,2.10),
 (192,5,1,1.60),(193,1,1,1.20),(193,2,2,4.50),(193,3,1,3.80),(194,15,1,3.80),(194,8,1,2.80),(194,3,1,3.80),(195,18,2,2.80),(195,1,1,1.20),(195,17,1,4.10),
 (196,18,2,2.80),(197,10,1,3.80),(197,9,2,3.20),(197,12,1,3.60),(198,13,1,2.60),(198,18,2,2.80),(198,8,1,2.80),(198,9,1,3.20),(199,17,3,4.10),(200,1,1,1.20),
 (201,5,1,1.60),(202,3,1,3.80),(202,16,1,4.20),(202,13,1,2.60),(203,20,2,1.50),(203,2,1,4.50),(203,13,2,2.60),(204,8,1,2.80),(204,3,1,3.80),(205,3,2,3.80),
 (205,11,1,2.10),(206,14,1,1.90),(206,16,1,4.20),(206,1,1,1.20),(207,16,1,4.20),(207,5,1,1.60),(207,17,1,4.10),(208,1,1,1.20),(208,11,1,2.10),(208,4,3,1.40),
 (209,16,1,4.20),(210,2,2,4.50),(210,3,1,3.80),(211,2,1,4.50),(211,1,2,1.20),(211,12,2,3.60),(212,7,2,3.90),(212,15,1,3.80),(213,8,1,2.80),(213,9,2,3.20),
 (214,8,1,2.80),(214,6,1,2.20),(214,13,2,2.60),(215,6,1,2.20),(215,16,1,4.20),(215,12,2,3.60),(216,6,1,2.20),(216,16,1,4.20),(216,3,2,3.80),(216,10,2,3.80),
 (217,12,3,3.60),(218,20,2,1.50),(218,2,1,4.50),(218,4,2,1.40),(219,12,1,3.60),(219,3,1,3.80),(220,15,1,3.80),(221,10,1,3.80),(221,7,1,3.90),(221,8,3,2.80),
 (222,2,1,4.50),(223,16,2,4.20),(223,2,1,4.50),(224,16,1,4.20),(225,16,1,4.20),(225,9,1,3.20),(226,8,1,2.80),(226,13,2,2.60),(227,15,1,3.80),(227,11,2,2.10),
 (228,5,1,1.60),(229,7,2,3.90),(229,8,1,2.80),(230,16,1,4.20),(230,5,1,1.60),(230,20,2,1.50),(231,11,3,2.10),(231,14,1,1.90),(232,14,3,1.90),(232,6,1,2.20),
 (232,11,1,2.10),(233,18,1,2.80),(233,4,2,1.40),(233,7,1,3.90),(234,9,1,3.20),(234,1,2,1.20),(235,1,1,1.20),(235,10,3,3.80),(235,11,1,2.10),(235,16,1,4.20),
 (236,2,3,4.50),(236,4,2,1.40),(236,9,1,3.20),(237,3,2,3.80),(237,13,1,2.60),(237,1,1,1.20),(238,18,1,2.80),(238,17,1,4.10),(239,9,3,3.20),(239,13,2,2.60),
 (240,16,1,4.20),(241,13,1,2.60),(242,1,2,1.20),(242,17,2,4.10),(242,14,1,1.90),(243,9,1,3.20),(243,6,3,2.20),(244,14,2,1.90),(245,8,1,2.80),(245,1,1,1.20),
 (246,8,1,2.80),(246,2,1,4.50),(246,15,1,3.80),(247,20,2,1.50),(247,2,2,4.50),(247,14,3,1.90),(247,8,2,2.80),(248,8,1,2.80),(248,17,1,4.10),(249,16,2,4.20),
 (249,3,1,3.80),(249,7,1,3.90),(249,9,2,3.20),(250,4,1,1.40),(250,12,2,3.60),(251,16,1,4.20),(252,12,1,3.60),(253,1,2,1.20),(254,8,2,2.80),(254,13,1,2.60),
 (254,4,1,1.40),(255,15,1,3.80),(256,13,1,2.60),(257,6,1,2.20),(257,18,1,2.80),(258,6,1,2.20),(259,15,1,3.80),(259,6,1,2.20),(259,9,2,3.20),(260,8,1,2.80),
 (260,12,1,3.60),(261,3,2,3.80),(261,9,2,3.20),(261,17,1,4.10),(262,10,2,3.80),(262,2,2,4.50),(263,14,1,1.90),(264,4,3,1.40),(264,3,1,3.80),(264,12,2,3.60),
 (265,15,2,3.80),(265,2,2,4.50),(266,11,1,2.10),(266,6,2,2.20),(267,3,2,3.80),(267,14,2,1.90),(267,13,1,2.60),(267,12,1,3.60),(268,18,2,2.80),(268,8,2,2.80),
 (269,1,1,1.20),(269,16,2,4.20),(270,7,2,3.90),(270,10,2,3.80),(271,7,2,3.90),(272,7,1,3.90),(272,2,2,4.50),(273,1,1,1.20),(273,8,2,2.80),(273,11,1,2.10),
 (273,14,1,1.90),(274,20,1,1.50),(274,17,1,4.10),(275,2,1,4.50),(275,13,1,2.60),(276,20,1,1.50),(277,13,2,2.60),(277,12,1,3.60),(277,5,1,1.60),(278,10,2,3.80),
 (278,1,2,1.20),(279,17,2,4.10),(279,12,1,3.60),(280,3,2,3.80),(280,1,1,1.20),(280,13,1,2.60),(281,1,2,1.20),(281,3,1,3.80),(281,18,1,2.80),(282,12,1,3.60),
 (282,11,1,2.10),(282,2,2,4.50),(283,14,1,1.90),(284,16,2,4.20),(284,17,2,4.10),(285,2,1,4.50),(285,8,1,2.80),(285,5,1,1.60),(285,18,1,2.80),(286,18,3,2.80),
 (287,9,2,3.20),(287,7,3,3.90),(288,20,3,1.50),(288,12,1,3.60),(288,16,1,4.20),(289,12,2,3.60),(289,6,3,2.20),(290,1,2,1.20),(290,20,1,1.50),(290,16,2,4.20),
 (290,10,1,3.80),(291,13,2,2.60),(291,3,1,3.80),(292,4,3,1.40),(292,1,2,1.20),(292,12,2,3.60),(292,20,1,1.50),(293,20,1,1.50),(293,1,1,1.20),(294,3,1,3.80),
 (294,1,2,1.20),(295,3,1,3.80),(296,12,1,3.60),(296,3,1,3.80),(296,10,1,3.80),(297,10,1,3.80),(297,18,2,2.80),(297,2,2,4.50),(298,1,1,1.20),(299,12,1,3.60),
 (299,1,1,1.20),(299,3,1,3.80),(300,17,1,4.10),(300,11,1,2.10),(300,15,1,3.80),(301,17,1,4.10),(301,7,3,3.90),(302,5,2,1.60),(302,17,2,4.10),(303,9,1,3.20);
INSERT INTO refund VALUES
 (1,102,'2026-03-12',3.20,'stale'),
 (2,138,'2026-03-16',2.20,'wrong item'),
 (3,173,'2026-03-17',1.20,'overcharged'),
 (4,160,'2026-03-18',3.60,'dropped'),
 (5,173,'2026-03-19',3.90,NULL),
 (6,179,'2026-03-21',1.90,'stale'),
 (7,229,'2026-03-24',3.90,'wrong item'),
 (8,237,'2026-03-25',1.20,'stale');