0

task: List the names of the dentists who had appointments between 01/11/2016 and 01/12/2016 and administered a procedure named ‘Local Anaesthetic.’

relevant tables:

staff(ID, fname,lname,role)

patient(pID,pFname,pLname,bdate,address)

appointment(aptID, patientID,staffID,aptDate,aptTime)

procedures(procNum,pName,price)

aptDetail(aptID,procNo)

Issue: I can inner join appointment and staff on ID=staffID but procedure has no common column, is it acceptable to do an inner join on appointment , procedures,staff and aptdetail even though I would not be using anything in aptDetai? Is that the bestw ay to go about it ? Thanks

Olivia
  • 1
  • 1
  • Possible duplicate of [Required to join 2 tables with their FKs in a 3rd table](https://stackoverflow.com/questions/23839392/required-to-join-2-tables-with-their-fks-in-a-3rd-table) – philipxy Dec 08 '18 at 23:58
  • If you don't need to use aptDetail then why use it? If you need to use aptDetail then what does it matter whether you return any values from it--since you need it for other reasons? – philipxy Dec 09 '18 at 00:01
  • This is a faq. Please always google error messages & many clear, concise & specific versions/phrasings of your question/problem/goal with & without your particular strings/names & 'site:stackoverflow.com' & tags & read many answers. Add relevant keywords you discover to your searches. If you don't find an answer then post, using 1 variant search as title & keywords for tags. See the downvote arrow mouseover text. When you do have a non-duplicate code question to post please read & act on [mcve]. – philipxy Dec 09 '18 at 00:03

0 Answers0