mercredi 25 mars 2015

Trying to find any rows in a table shared by two other keys (in same table)

I'm looking for a little help with some SQLite. I'm trying to write a query in a simple a way as possible. That is, with SQL statements rather than retrieving a set of data, then another set and comparing them by iterating through both.


Looking at the extract of a table below: I know both parent IDs and I want to find all the children IDs they have in common. So parent 291 & 673 have 755 in common. They could have one, or more, children in common.


How can I write an select statement to find 755?


Thanks in advance for any thoughts. David


enter image description here


Aucun commentaire:

Enregistrer un commentaire