Database: machine_repair

Question: Show the name of technicians aged either 36 or 37
SQL: SELECT Name FROM technician WHERE Age  =  36 OR Age  =  37

Question: What is the starting year of the oldest technicians?
SQL: SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1

Question: Please show the team that has the most number of technicians.
SQL: SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1

Question: Show the team that have at least two technicians.
SQL: SELECT Team FROM technician GROUP BY Team HAVING COUNT(*)  >=  2

Question: Show names of technicians and series of machines they are assigned to repair.
SQL: SELECT T3.Name ,  T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID

Question: Show names of technicians in ascending order of quality rank of the machine they are assigned.
SQL: SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID ORDER BY T2.quality_rank

Question: Show names of technicians who are assigned to repair machines with value point more than 70.
SQL: SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID WHERE T2.value_points  >  70

Question: Show names of technicians and the number of machines they are assigned to repair.
SQL: SELECT T2.Name ,  COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID  =  T2.technician_ID GROUP BY T2.Name

Question: List the names of technicians who have not been assigned to repair machines.
SQL: SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)