Created
March 9, 2023 17:52
-
-
Save salgo60/1cf4a0bbf05c926e90ffb57247856a1f to your computer and use it in GitHub Desktop.
Check P1260
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://w.wiki/6RS9 | |
SELECT ?item ?itemLabel ?shm (count(?id2) AS ?nr) (GROUP_CONCAT(DISTINCT ?id2; SEPARATOR=", ") AS ?x )WHERE { | |
?item wdt:P1260 ?id2. | |
?item wdt:P31 wd:Q5. | |
OPTIONAL {?item wdt:P9495 ?shm} | |
{ | |
SELECT ?item ?id WHERE { | |
?item wdt:P1260 ?id. | |
FILTER(CONTAINS(?id, "LSH/agents")) | |
} | |
} | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". } | |
FILTER(?id2 != ?id) | |
} | |
GROUP BY ?item ?itemLabel ?shm having(?nr > 1) | |
order by DESC(?nr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment