prompt
stringclasses 10
values | response
stringclasses 10
values |
|---|---|
List all employees in the IT department.
|
SELECT * FROM employees WHERE department = 'IT';
|
Find customers who placed orders over $500.
|
SELECT * FROM customers WHERE order_amount > 500;
|
Retrieve the names of all students enrolled in the Physics class.
|
SELECT name FROM students WHERE class = 'Physics';
|
Show all products with a price greater than $1000.
|
SELECT * FROM products WHERE price > 1000;
|
Get the total sales for each product category.
|
SELECT category, SUM(sales) FROM sales_data GROUP BY category;
|
Count the number of employees in each department.
|
SELECT department, COUNT(*) FROM employees GROUP BY department;
|
Retrieve orders made in the last 7 days.
|
SELECT * FROM orders WHERE order_date >= DATE_SUB(CURDATE(), INTERVAL 7 DAY);
|
Find the average salary of employees in the HR department.
|
SELECT AVG(salary) FROM employees WHERE department = 'HR';
|
Show the top 5 highest-paid employees.
|
SELECT * FROM employees ORDER BY salary DESC LIMIT 5;
|
Get the details of all customers who live in New York.
|
SELECT * FROM customers WHERE city = 'New York';
|
README.md exists but content is empty.
- Downloads last month
- 11