Wikidata:WikiProject Goats/Queries
Jump to navigation
Jump to search
Global goat queries[edit]
Goats only[edit]
The following query uses these:
- Items: goat (Q2934)
- Properties: instance of (P31) , image (P18)
SELECT ?item ?itemLabel ?image WHERE { ?item wdt:P31 wd:Q2934. OPTIONAL { ?item wdt:P18 ?image . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Extended goats[edit]
The following query uses these:
- Properties: instance of (P31) , image (P18)
SELECT ?item ?itemLabel ?image WHERE { ?item wdt:P31 ?goats. VALUES ?goats { wd:Q2934 wd:Q172923 wd:Q27713372 } OPTIONAL { ?item wdt:P18 ?image . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }