-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfew_shots.py
More file actions
44 lines (44 loc) 路 2.2 KB
/
Copy pathfew_shots.py
File metadata and controls
44 lines (44 loc) 路 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
few_shots = [
{
"Question": "How many t-shirts do we have left for Nike in XS size and white color?",
"SQLQuery": "SELECT sum(stock_quantity) FROM t_shirts WHERE brand = 'Nike' AND color = 'White' AND size = 'XS'",
"SQLResult": "Result of the SQL query",
"Answer": "91",
},
{
"Question": "How much is the total price of the inventory for all S-size t-shirts?",
"SQLQuery": "SELECT SUM(price*stock_quantity) FROM t_shirts WHERE size = 'S'",
"SQLResult": "Result of the SQL query",
"Answer": "22292",
},
{
"Question": "If we have to sell all the Levi鈥檚 T-shirts today with discounts applied. How much revenue our store will generate (post discounts)?",
"SQLQuery": """SELECT sum(a.total_amount * ((100-COALESCE(discounts.pct_discount,0))/100)) as total_revenue from
(select sum(price*stock_quantity) as total_amount, t_shirt_id from t_shirts where brand = 'Levi'
group by t_shirt_id) a left join discounts on a.t_shirt_id = discounts.t_shirt_id
""",
"SQLResult": "Result of the SQL query",
"Answer": "16725.4",
},
{
"Question": "If we have to sell all the Levi鈥檚 T-shirts today. How much revenue our store will generate without discount?",
"SQLQuery": "SELECT SUM(price * stock_quantity) FROM t_shirts WHERE brand = 'Levi'",
"SQLResult": "Result of the SQL query",
"Answer": "17462",
},
{
"Question": "How many white color Levi's shirt I have?",
"SQLQuery": "SELECT sum(stock_quantity) FROM t_shirts WHERE brand = 'Levi' AND color = 'White'",
"SQLResult": "Result of the SQL query",
"Answer": "290",
},
{
"Question": "how much sales amount will be generated if we sell all large size t shirts today in nike brand after discounts?",
"SQLQuery": """SELECT sum(a.total_amount * ((100-COALESCE(discounts.pct_discount,0))/100)) as total_revenue from
(select sum(price*stock_quantity) as total_amount, t_shirt_id from t_shirts where brand = 'Nike' and size="L"
group by t_shirt_id) a left join discounts on a.t_shirt_id = discounts.t_shirt_id
""",
"SQLResult": "Result of the SQL query",
"Answer": "290",
},
]