Storeapp / example.py
rengaraj's picture
Upload 5 files (#2)
f420ec5 verified
raw
history blame
2.91 kB
# Few Shot Learnings
example = [
{ 'Question': "Top 10 stores with highest sales and the number of transactions",
'SQLQuery': "SELECT store_number, COUNT(store_number) AS num_transactions FROM sales GROUP BY store_number ORDER BY SUM(sale_price) DESC;",
'SQLResult': "Result of the SQL query",
'Answer': "answer"
},
{ 'Question': "List of all stores transactions for Sheri Williams",
'SQLQuery': "SELECT customer_id, product, quantity, sale_price, sales_channel FROM sales WHERE name = 'Sheri Williams' AND sales_channel = 'st'",
'SQLResult': "Result of the SQL Query",
'Answer': "answer"
},
{ 'Question': "Top customer who bought product7 the most in store",
'SQLQuery': "SELECT customer_id, name, count(product) as total_product7_purchases from sales where product = 'Product7' and store_number = 1365 group by customer_id, name ORDER BY total_product7_purchases DESC LIMIT 10",
'SQLResult': "Result of the SQL Query",
'Answer': "answer"
},
{
'Question': "List of all online transactions for Sheri Williams",
'SQLQuery': "SELECT customer_id, product, quantity, sale_price, sales_channel FROM sales WHERE name = 'Sheri Williams' AND sales_channel = 'ol'",
'SQLResult': "Result of the SQL query",
'Answer': "answer"
},
{
'Question': "find the product with the highest sales in store 4057",
'SQLQuery': "SELECT product, SUM(sale_price) as total_sales_amount FROM sales WHERE store_number = 4057 GROUP BY product ORDER BY total_sales_amount DESC LIMIT 1;",
'SQLResult': "Result of the SQL query",
'Answer': "answer"
},
{
'Question': "List of all sales transactions in the last 1 week",
'SQLQuery': "SELECT customer_id, product, quantity, sale_price, sales_channel, date FROM sales WHERE date >= CURDATE() - INTERVAL 1 WEEK;",
'SQLResult': "Result of the SQL query",
'Answer': "answer"
},
{
'Question': "List of all sales transactions this week",
'SQLQuery': "SELECT customer_id, product, quantity, sale_price, sales_channel, date FROM sales WHERE date >= CURDATE() - INTERVAL DAYOFWEEK(CURDATE())-1 DAY AND date < CURDATE() + INTERVAL 1 DAY;",
'SQLResult': "Result of the SQL query",
'Answer': "answer"
},
{
'Question': " Top 10 stores with highest sales and the number of transactions with sales amount & store associate name",
'SQLQuery': "SELECT s.store_number, COUNT(s.store_number) AS num_transactions, SUM(s.sale_price) AS total_sales, st.store_associate FROM sales s JOIN stores st ON s.store_number = st.store_number GROUP BY s.store_number ORDER BY total_sales DESC;",
'SQLResult': "Result of the SQL query",
'Answer': "answer"
}
]