column_names: -1
*
0
employee id
0
name
0
age
0
city
1
shop id
1
name
1
location
1
district
1
number products
1
manager name
2
shop id
2
employee id
2
start from
2
is full time
3
employee id
3
year awarded
3
bonus
column_names_original: -1
*
0
Employee_ID
0
Name
0
Age
0
City
1
Shop_ID
1
Name
1
Location
1
District
1
Number_products
1
Manager_name
2
Shop_ID
2
Employee_ID
2
Start_from
2
Is_full_time
3
Employee_ID
3
Year_awarded
3
Bonus
column_types: text
number
text
number
text
number
text
text
text
number
text
number
number
text
others
text
text
number
db_id: employee_hire_evaluation
table_names: employee
shop
hiring
evaluation
table_names_original: employee
shop
hiring
evaluation

How many employees are there?
SELECT count(*) FROM employee

Count the number of employees
SELECT count(*) FROM employee

Sort employee names by their age in ascending order.
SELECT name FROM employee ORDER BY age

List the names of employees and sort in ascending order of age.
SELECT name FROM employee ORDER BY age

What is the number of employees from each city?
SELECT count(*) ,  city FROM employee GROUP BY city

Count the number of employees for each city.
SELECT count(*) ,  city FROM employee GROUP BY city

Which cities do more than one employee under age 30 come from?
SELECT city FROM employee WHERE age  <  30 GROUP BY city HAVING count(*)  >  1

Find the cities that have more than one employee under age 30.
SELECT city FROM employee WHERE age  <  30 GROUP BY city HAVING count(*)  >  1

Find the number of shops in each location.
SELECT count(*) ,  LOCATION FROM shop GROUP BY LOCATION

How many shops are there in each location?
SELECT count(*) ,  LOCATION FROM shop GROUP BY LOCATION

Find the manager name and district of the shop whose number of products is the largest.
SELECT manager_name ,  district FROM shop ORDER BY number_products DESC LIMIT 1

What are the manager name and district of the shop that sells the largest number of products?
SELECT manager_name ,  district FROM shop ORDER BY number_products DESC LIMIT 1

find the minimum and maximum number of products of all stores.
SELECT min(Number_products) ,  max(Number_products) FROM shop

What are the minimum and maximum number of products across all the shops?
SELECT min(Number_products) ,  max(Number_products) FROM shop

Return the name, location and district of all shops in descending order of number of products.
SELECT name ,  LOCATION ,  district FROM shop ORDER BY number_products DESC

Sort all the shops by number products in descending order, and return the name, location and district of each shop.
SELECT name ,  LOCATION ,  district FROM shop ORDER BY number_products DESC

Find the names of stores whose number products is more than the average number of products.
SELECT name FROM shop WHERE number_products  >  (SELECT avg(number_products) FROM shop)

Which shops' number products is above the average? Give me the shop names.
SELECT name FROM shop WHERE number_products  >  (SELECT avg(number_products) FROM shop)

find the name of employee who was awarded the most times in the evaluation.
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1

Which employee received the most awards in evaluations? Give me the employee name.
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1

Find the name of the employee who got the highest one time bonus.
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1

Which employee received the biggest bonus? Give me the employee name.
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID  =  t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1

Find the names of employees who never won any award in the evaluation.
SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)

What are the names of the employees who never received any evaluation?
SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)

What is the name of the shop that is hiring the largest number of employees?
SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1

Which shop has the most employees? Give me the shop name.
SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1

Find the name of the shops that do not hire any employee.
SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)

Which shops run with no employees? Find the shop names
SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)

Find the number of employees hired in each shop; show the shop name as well.
SELECT count(*) ,  t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t2.name

For each shop, return the number of employees working there and the name of the shop.
SELECT count(*) ,  t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t2.name

What is total bonus given in all evaluations?
SELECT sum(bonus) FROM evaluation

Find the total amount of bonus given in all the evaluations.
SELECT sum(bonus) FROM evaluation

Give me all the information about hiring.
SELECT * FROM hiring

What is all the information about hiring?
SELECT * FROM hiring

Which district has both stores with less than 3000 products and stores with more than 10000 products?
SELECT district FROM shop WHERE Number_products  <  3000 INTERSECT SELECT district FROM shop WHERE Number_products  >  10000

Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.
SELECT district FROM shop WHERE Number_products  <  3000 INTERSECT SELECT district FROM shop WHERE Number_products  >  10000

How many different store locations are there?
SELECT count(DISTINCT LOCATION) FROM shop

Count the number of distinct store locations.
SELECT count(DISTINCT LOCATION) FROM shop