Created
April 21, 2020 18:07
-
-
Save rolandcrosby/936c84bd96d3396ecc6b943e5048a777 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
SELECT ?ingredient ?ingredientLabel (GROUP_CONCAT(DISTINCT ?sandwichLabel; SEPARATOR = ", ") AS ?sandwiches) WHERE { | |
?sandwich ((wdt:P31?)/(wdt:P279*)) wd:Q28803; | |
wdt:P527 ?ingredient. | |
MINUS { ?ingredient (wdt:P279*) wd:Q7802. } | |
SERVICE wikibase:label { | |
bd:serviceParam wikibase:language "en", "fr". | |
?sandwich rdfs:label ?sandwichLabel. | |
?ingredient rdfs:label ?ingredientLabel. | |
} | |
} | |
GROUP BY ?ingredient ?ingredientLabel | |
ORDER BY DESC (COUNT(DISTINCT ?sandwich)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment