it should beselect empname ,citinamefrom employee, orders,citywhere employees.empkey = orders.empkeyand employees.citikey = city.empkey
you wont get less employees unless you've employee records that are not attached to city. it just returns the related city info also along with employee details. just in case you dont have city info for some employee you can use belowselect empname ,coalesce(citiname,'No City') AS cityfrom employee ejoin orders oon o.empkey = e.empkeyleft join city con c.empkey=e.citikey
this will return employee details evn if they're not associated to city. city value will be NULL in those cases which we can convert to default value using coalesce.