Spaces:
Running
Running
expand dataset
Browse files- database.py +40 -4
database.py
CHANGED
@@ -38,9 +38,45 @@ with engine.connect() as conn:
|
|
38 |
count = result.scalar()
|
39 |
if count == 0:
|
40 |
rows = [
|
41 |
-
{"receipt_id": 1, "customer_name": "
|
42 |
-
{"receipt_id": 2, "customer_name": "
|
43 |
-
{"receipt_id": 3, "customer_name": "
|
44 |
-
{"receipt_id": 4, "customer_name": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
]
|
46 |
insert_rows_into_table(rows, receipts)
|
|
|
38 |
count = result.scalar()
|
39 |
if count == 0:
|
40 |
rows = [
|
41 |
+
{"receipt_id": 1, "customer_name": "Ezekiel Frost", "price": 10.50, "tip": 2.00},
|
42 |
+
{"receipt_id": 2, "customer_name": "Marla Dune", "price": 23.75, "tip": 4.50},
|
43 |
+
{"receipt_id": 3, "customer_name": "Thorne Blackwood", "price": 55.20, "tip": 6.25},
|
44 |
+
{"receipt_id": 4, "customer_name": "Selene Ashford", "price": 32.10, "tip": 3.50},
|
45 |
+
{"receipt_id": 5, "customer_name": "Vesper Hawthorne", "price": 19.80, "tip": 2.75},
|
46 |
+
{"receipt_id": 6, "customer_name": "Jaxon Raines", "price": 48.60, "tip": 5.00},
|
47 |
+
{"receipt_id": 7, "customer_name": "Liora Vale", "price": 27.45, "tip": 3.00},
|
48 |
+
{"receipt_id": 8, "customer_name": "Orion Finch", "price": 60.25, "tip": 7.50},
|
49 |
+
{"receipt_id": 9, "customer_name": "Calista Morrigan", "price": 38.90, "tip": 4.25},
|
50 |
+
{"receipt_id": 10, "customer_name": "Dorian Storm", "price": 50.75, "tip": 6.75},
|
51 |
+
{"receipt_id": 11, "customer_name": "Lucian Crowe", "price": 11.90, "tip": 1.50},
|
52 |
+
{"receipt_id": 12, "customer_name": "Eris Delacroix", "price": 29.95, "tip": 3.75},
|
53 |
+
{"receipt_id": 13, "customer_name": "Zane Evermore", "price": 45.80, "tip": 5.50},
|
54 |
+
{"receipt_id": 14, "customer_name": "Isolde Winter", "price": 31.20, "tip": 2.25},
|
55 |
+
{"receipt_id": 15, "customer_name": "Galen Hallow", "price": 18.60, "tip": 2.00},
|
56 |
+
{"receipt_id": 16, "customer_name": "Sable Whitmore", "price": 54.35, "tip": 6.00},
|
57 |
+
{"receipt_id": 17, "customer_name": "Cassian Vex", "price": 28.10, "tip": 3.25},
|
58 |
+
{"receipt_id": 18, "customer_name": "Selwyn Fox", "price": 61.45, "tip": 7.75},
|
59 |
+
{"receipt_id": 19, "customer_name": "Thalia Rune", "price": 37.20, "tip": 4.00},
|
60 |
+
{"receipt_id": 20, "customer_name": "Draven Nocturne", "price": 49.95, "tip": 6.25},
|
61 |
+
{"receipt_id": 21, "customer_name": "Kieran Wolfe", "price": 12.75, "tip": 1.75},
|
62 |
+
{"receipt_id": 22, "customer_name": "Ember Sterling", "price": 30.60, "tip": 3.50},
|
63 |
+
{"receipt_id": 23, "customer_name": "Valko Nightshade", "price": 47.90, "tip": 5.75},
|
64 |
+
{"receipt_id": 24, "customer_name": "Ronan Greaves", "price": 33.40, "tip": 3.00},
|
65 |
+
{"receipt_id": 25, "customer_name": "Lyra Voss", "price": 20.50, "tip": 2.25},
|
66 |
+
{"receipt_id": 26, "customer_name": "Caius Everdark", "price": 53.25, "tip": 6.50},
|
67 |
+
{"receipt_id": 27, "customer_name": "Eowyn Vale", "price": 26.80, "tip": 2.75},
|
68 |
+
{"receipt_id": 28, "customer_name": "Phoenix Ashen", "price": 59.30, "tip": 7.00},
|
69 |
+
{"receipt_id": 29, "customer_name": "Leif Hawthorne", "price": 36.15, "tip": 3.75},
|
70 |
+
{"receipt_id": 30, "customer_name": "Zephyr Sterling", "price": 48.75, "tip": 6.00},
|
71 |
+
{"receipt_id": 31, "customer_name": "Solene Ardent", "price": 13.90, "tip": 1.25},
|
72 |
+
{"receipt_id": 32, "customer_name": "Orpheus Dawn", "price": 31.95, "tip": 2.50},
|
73 |
+
{"receipt_id": 33, "customer_name": "Nyx Holloway", "price": 46.85, "tip": 5.25},
|
74 |
+
{"receipt_id": 34, "customer_name": "Rowan Nightshade", "price": 32.75, "tip": 3.00},
|
75 |
+
{"receipt_id": 35, "customer_name": "Dante Crowley", "price": 22.50, "tip": 2.00},
|
76 |
+
{"receipt_id": 36, "customer_name": "Sylas Vex", "price": 55.90, "tip": 6.75},
|
77 |
+
{"receipt_id": 37, "customer_name": "Isabeau Winters", "price": 27.85, "tip": 3.25},
|
78 |
+
{"receipt_id": 38, "customer_name": "Astra Everhart", "price": 62.10, "tip": 8.00},
|
79 |
+
{"receipt_id": 39, "customer_name": "Tiberius Dusk", "price": 39.60, "tip": 4.50},
|
80 |
+
{"receipt_id": 40, "customer_name": "Eldric Thorn", "price": 50.95, "tip": 6.25},
|
81 |
]
|
82 |
insert_rows_into_table(rows, receipts)
|