text
stringlengths
0
220
Natural Query: List all products of Foster LLC ordered by price from lowest to highest.
SQL Query: SELECT * FROM products WHERE company_name = 'Foster LLC' ORDER BY price ASC
Natural Query: Show me all products in the foot category with a price over $91.72.
SQL Query: SELECT * FROM products WHERE category = 'foot' AND price > 91.72
Natural Query: List all customers and their total order value for Brown Inc.
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 = 'Brown Inc' GROUP BY c.customer_id
Natural Query: Show me all products in the appear category with a price over $403.98.
SQL Query: SELECT * FROM products WHERE category = 'appear' AND price > 403.98
Natural Query: What is the total quantity for each supplier in Crawford, Gonzalez and Lynch?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Crawford, Gonzalez and Lynch' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: What are the top 5 products by customers for Johnson, James and Bailey all time?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Johnson, James and Bailey' AND period = 'all time' GROUP BY product_name ORDER BY total_customers DESC LIMIT 5
Natural Query: Show me all products in the process category with a price over $197.95.
SQL Query: SELECT * FROM products WHERE category = 'process' AND price > 197.95
Natural Query: What are the top 4 products by customers for Lewis LLC last quarter?
SQL Query: SELECT product_name, SUM(customers) as total_customers FROM sales WHERE company_name = 'Lewis LLC' AND period = 'last quarter' GROUP BY product_name ORDER BY total_customers DESC LIMIT 4
Natural Query: What is the total sales for each country in Moore Inc?
SQL Query: SELECT country, SUM(sales) as total_sales FROM sales WHERE company_name = 'Moore Inc' GROUP BY country ORDER BY total_sales DESC
Natural Query: How many orders were placed for Weber, Hansen and Long between 2023-12-16 and 2024-02-17?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Weber, Hansen and Long' AND order_date BETWEEN '2023-12-16' AND '2024-02-17'
Natural Query: List all customers and their total order value for Tate Ltd.
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 = 'Tate Ltd' GROUP BY c.customer_id
Natural Query: List all customers and their total order value for Gillespie and Sons.
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 = 'Gillespie and Sons' GROUP BY c.customer_id
Natural Query: Show me all products in the strong category with a price over $646.19.
SQL Query: SELECT * FROM products WHERE category = 'strong' AND price > 646.19
Natural Query: List all products of Johnson Group ordered by stock_quantity from highest to lowest.
SQL Query: SELECT * FROM products WHERE company_name = 'Johnson Group' ORDER BY stock_quantity DESC
Natural Query: What is the total rating of all products for Fernandez, Ortiz and Schmidt?
SQL Query: SELECT TOTAL(rating) as result FROM products WHERE company_name = 'Fernandez, Ortiz and Schmidt'
Natural Query: List all customers and their total order value for Wilson LLC.
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 = 'Wilson LLC' GROUP BY c.customer_id
Natural Query: What are the top 5 products by revenue for Anderson, Owens and Bishop this year?
SQL Query: SELECT product_name, SUM(revenue) as total_revenue FROM sales WHERE company_name = 'Anderson, Owens and Bishop' AND period = 'this year' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 5
Natural Query: List all customers and their total order value for Gonzalez Ltd.
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 = 'Gonzalez Ltd' GROUP BY c.customer_id
Natural Query: How many orders were placed for Martin-Ayala between 2023-10-08 and 2024-08-22?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Martin-Ayala' AND order_date BETWEEN '2023-10-08' AND '2024-08-22'
Natural Query: What is the total quantity for each supplier in Taylor PLC?
SQL Query: SELECT supplier, SUM(quantity) as total_quantity FROM sales WHERE company_name = 'Taylor PLC' GROUP BY supplier ORDER BY total_quantity DESC
Natural Query: Show me all products in the whatever category with a price over $263.81.
SQL Query: SELECT * FROM products WHERE category = 'whatever' AND price > 263.81
Natural Query: What is the minimum rating of all products for Ramsey-Wang?
SQL Query: SELECT MINIMUM(rating) as result FROM products WHERE company_name = 'Ramsey-Wang'
Natural Query: List all customers and their total order value for Flores and Sons.
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 = 'Flores and Sons' GROUP BY c.customer_id
Natural Query: What is the total profit for each country in Hendrix Inc?
SQL Query: SELECT country, SUM(profit) as total_profit FROM sales WHERE company_name = 'Hendrix Inc' GROUP BY country ORDER BY total_profit DESC
Natural Query: How many orders were placed for Brown, Murphy and Palmer between 2023-12-31 and 2024-05-29?
SQL Query: SELECT COUNT(*) as order_count FROM orders WHERE company_name = 'Brown, Murphy and Palmer' AND order_date BETWEEN '2023-12-31' AND '2024-05-29'
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Maxwell Inc 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 = 'Maxwell Inc'
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 8 products by orders for Payne-Sherman last quarter?
SQL Query: SELECT product_name, SUM(orders) as total_orders FROM sales WHERE company_name = 'Payne-Sherman' AND period = 'last quarter' GROUP BY product_name ORDER BY total_orders DESC LIMIT 8
Natural Query: List all customers and their total order value for Beltran-Paul.
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 = 'Beltran-Paul' GROUP BY c.customer_id
Natural Query: What is the total sales for each supplier in Wheeler, Jones and Franklin?
SQL Query: SELECT supplier, SUM(sales) as total_sales FROM sales WHERE company_name = 'Wheeler, Jones and Franklin' GROUP BY supplier ORDER BY total_sales DESC
Natural Query: What are the top 5 categories by sales for customers aged 25-35 in Jones, Doyle and Anderson 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