mysql - Complex query, many joins -


i've been wrestling few hours , i'm hoping can give me fresh insight. have 6 tables follows:

  • table a
  • table b, child of (one-to-many)
  • table c, child of b (one-to-many)
  • table d, child of (one-to-many)

  • table e parent of d, in one-to-[zero-or-one] relationship

  • table f, child of e (one-to-many)

basically need select field b c = f.

i have tried subqueries, joins, , combination of both, have not got far. ideas appreciated.

with information you've presented, how about

select  *            inner join b on b.aid = a.aid         inner join c on c.bid = b.bid         inner join d on d.aid = a.aid         inner join e on e.did = d.did         inner join f on f.eid = e.eid   c.field = f.field 

if not need, might want post small subset of data required results.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -