Requirement
Find and display all pilots (employee ID and name) who implemented flights on the planes of 'Commuter' type and ‘Normal’ type.
1st image is Plane_new table
2nd image is FlightI_new table
3rd image is Employee_new table
Solution
SELECT flightI_new.eid, employee_new.ename
FROM flightI_new
INNER JOIN employee_new ON flightI_new.eid = employee_new.eid
INNER JOIN plane_new ON flightI_new.pnum = plane_new.pnum
WHERE plane_new.ptype = 'Commuter' AND plane_new.ptype = 'Normal';
The code works with OR, but for some reason with AND i get "no rows returned".
Any idea how to solve it?