0

Another title could be: Is there an inverse of "member of"? I don't see anything like that.

I can get all the person who are member of an organization.

SELECT ?p ?pLabel WHERE {
  ?p wdt:P463 wd:Q3227220.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

But I can't understand the way to get the inverse:

  1. I've got a given human person (with ID or label)
  2. I want the organizations he is "member of"

Question 1: 1Is it possible to do it or it's a feature to "not be able" to do that?

Question 2: If it's possible, is there a wizard somewhere to find a magic peace of sheet?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
KBill
  • 166
  • 1
  • 12
  • https://w.wiki/jwN or even https://w.wiki/jwf – Stanislav Kralin Nov 03 '20 at 14:55
  • Right! I understand the sql langage much more now! We just need to invert the variable and the value and that's it! I want to give you a the answer but i don't knwo how! What a pitty! – KBill Nov 03 '20 at 15:10
  • it's not SQL but SPARQL ... he has to create an answer, then you could accept the answer. – UninformedUser Nov 03 '20 at 15:30
  • I don't really take the time for the moment to understand the difference. Seems to be very similar. A good link to share about this difference? Do you mean that in sql the inversion of variable and values don't works in the same way? – KBill Nov 03 '20 at 16:17
  • I believe they just meant that SQL and SPARQL are different things, in the sense that saying "this is a very nice car" about an airplane would irritate people. To invert, you can either switch subject and object (wd:Q3227220 wdt:P463 ?p), or use ^ which modifies the predicate: (?p ^wdt:P463 wd:Q3227220) – Matthias Winkelmann Nov 05 '20 at 00:55

0 Answers0