text
stringlengths
0
220
SQL Query: SELECT MAXIMUM(rating) as result FROM products WHERE company_name = 'Lowe, Newman and Grant'
Natural Query: What are the top 9 products by customers for Campbell Inc all time?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Campbell Inc' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 9
Natural Query: List all products of Brewer LLC ordered by rating from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Brewer LLC' ORDER BY rating DESC
Natural Query: What is the total quantity for each supplier in Nelson-Riley?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Nelson-Riley' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: How many orders were placed for Lewis PLC between 2023-12-02 and 2024-01-02?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Lewis PLC' AND order_date BETWEEN '2023-12-02' AND '2024-01-02'
Natural Query: What is the total profit for each category in Burns Group?
SQL Query: SELECT category, SUM(profit) as total_profit FROM sales WHERE company_name = 'Burns Group' GROUP BY category ORDER BY total_profit DESC
Natural Query: Show me all products in the here category with a price over $847.84.
SQL Query: SELECT * FROM products WHERE category = 'here' AND price > 847.84
Natural Query: How many orders were placed for Yates, Ferguson and Bryant between 2024-08-17 and 2024-09-11?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Yates, Ferguson and Bryant' AND order_date BETWEEN '2024-08-17' AND '2024-09-11'
Natural Query: List all products of Baker, Price and Norris ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Baker, Price and Norris' ORDER BY stock_quantity DESC
Natural Query: How many orders were placed for Ramos, Tucker and Burns between 2023-12-01 and 2024-01-05?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Ramos, Tucker and Burns' AND order_date BETWEEN '2023-12-01' AND '2024-01-05'
Natural Query: Show me all products in the dark category with a price over $990.73.
SQL Query: SELECT * FROM products WHERE category = 'dark' AND price > 990.73
Natural Query: What are the top 10 products by orders for Cooper, Gonzales and James last quarter?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Cooper, Gonzales and James' AND period = 'last quarter' GROUP BY product_name ORDER BY total_orders DESC LIMIT 10
Natural Query: What are the top 5 products by orders for Morris, Welch and Rodriguez last quarter?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Morris, Welch and Rodriguez' AND period = 'last quarter' GROUP BY product_name ORDER BY total_orders DESC LIMIT 5
Natural Query: What is the total profit for each country in Cook, Reeves and Buckley?
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Cook, Reeves and Buckley' GROUP BY country ORDER BY total_profit DESC
Natural Query: What is the total quantity for each category in Bautista, Jarvis and Morgan?
SQL Query: SELECT category, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Bautista, Jarvis and Morgan' GROUP BY category ORDER BY total_quantity DESC
Natural Query: What is the total quantity for each country in Jones-Martin?
SQL Query: SELECT country, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Jones-Martin' GROUP BY country ORDER BY total_quantity DESC
Natural Query: List all products of Wilson-Young ordered by rating from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Wilson-Young' ORDER BY rating ASC
Natural Query: How many orders were placed for Thompson-Torres between 2024-02-21 and 2024-03-07?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Thompson-Torres' AND order_date BETWEEN '2024-02-21' AND '2024-03-07'
Natural Query: List all products of Johnson LLC ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Johnson LLC' ORDER BY price ASC
Natural Query: List all customers and their total order value for Bird, Woods and Brown.
SQL Query: SELECT c.customer_name, SUM(o.order_total) as total_value FROM customers c JOIN orders o ON c.customer_id = o.customer_id WHERE c.company_name = 'Bird, Woods and Brown' GROUP BY c.customer_id
Natural Query: List all products of Ramirez-Hall ordered by rating from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Ramirez-Hall' ORDER BY rating DESC
Natural Query: What is the minimum quantity of all products for Morales Ltd?
SQL Query: SELECT MINIMUM(quantity) as result FROM products WHERE company_name = 'Morales Ltd'
Natural Query: What are the top 5 products by customers for Anderson-Riley this year?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Anderson-Riley' AND period = 'this year' GROUP BY product_name ORDER BY total_customers DESC LIMIT 5
Natural Query: How many orders were placed for Davidson-Joseph between 2023-11-10 and 2024-08-20?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Davidson-Joseph' AND order_date BETWEEN '2023-11-10' AND '2024-08-20'
Natural Query: How many orders were placed for Simmons, Turner and Martinez between 2024-05-19 and 2024-07-17?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Simmons, Turner and Martinez' AND order_date BETWEEN '2024-05-19' AND '2024-07-17'
Natural Query: What is the total profit for each supplier in Moreno, Mahoney and Adams?
SQL Query: SELECT supplier, SUM(profit) as total_profit FROM sales WHERE company_name = 'Moreno, Mahoney and Adams' GROUP BY supplier ORDER BY total_profit DESC
Natural Query: How many orders were placed for Jones Group between 2024-04-09 and 2024-08-13?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Jones Group' AND order_date BETWEEN '2024-04-09' AND '2024-08-13'
Natural Query: Show me all products in the available category with a price over $345.35.
SQL Query: SELECT * FROM products WHERE category = 'available' AND price > 345.35
Natural Query: List all customers and their total order value for Weaver, Sullivan and Ferguson.
SQL Query: SELECT c.customer_name, SUM(o.order_total) as total_value FROM customers c JOIN orders o ON c.customer_id = o.customer_id WHERE c.company_name = 'Weaver, Sullivan and Ferguson' GROUP BY c.customer_id
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Sanders, Johnson and Williamson for the last quarter?
SQL Query: SELECT p.category, SUM(s.sales) as total_sales
FROM sales s
JOIN products p ON s.product_id = p.product_id
JOIN customers c ON s.customer_id = c.customer_id
WHERE c.age BETWEEN 25 AND 35
AND s.company_name = 'Sanders, Johnson and Williamson'
AND s.sale_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
GROUP BY p.category
ORDER BY total_sales DESC
LIMIT 5
Natural Query: What are the top 9 products by orders for Wright-Bass last quarter?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Wright-Bass' AND period = 'last quarter' GROUP BY product_name ORDER BY total_orders DESC LIMIT 9