Wikidata:WikiProject Goats/Queries

From Wikidata
Jump to navigation Jump to search

Home

 

Properties

 

Queries

 

Todo

 

Global goat queries[edit]

Goats only[edit]

The following query uses these:

  • Properties: instance of (P31)  View with Reasonator View with SQID, image (P18)  View with Reasonator View with SQID
    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)  View with Reasonator View with SQID, image (P18)  View with Reasonator View with SQID
    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". }
    }