i have the tables below:
patient: id, incidentCode, name, insurance, contactdetailsID
contactDetails: id, cityCode
lookup: id, lookupdescription
incident: id, date
patient joins contactdetails like:
inner join contactdetails on patient.contactdetailsid=contactdetails.id
patient joins incident like:
inner join incident on patient.incidentCode=incident.id
patient joins lookup like:
inner join lookup on patient.insurance = lookup.id
and contact details joins lookup like:
inner join lookup on contactdetails.citycode = lookup.id
and now i want to Select both Lookup.lookupDescription from patient insurance and contactdetails Citycode. How can i do that? At select i also want patient.name, patient.id, incident.date