query-3269486d91e91385e17ed0c2f08df0d0

rq turtle/ttl

added 2023-06

gender of accused witches in Scotland

SELECT ?item ?itemLabel ?genderLabel WHERE { ?item wdt:P31 wd:Q5. # Must be of a human ?item wdt:P4478 ?survey . # must be in the Survey of Scottish witchcraft OPTIONAL { ?item wdt:P21 ?gender . # may or may not have a known gender } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en language }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#added 2023-06
# gender of accused witches in Scotland
SELECT ?item ?itemLabel ?genderLabel
WHERE 
{
  ?item wdt:P31 wd:Q5. # Must be of a human
  ?item wdt:P4478 ?survey . # must be in the Survey of Scottish witchcraft
  OPTIONAL
  {
  ?item wdt:P21 ?gender . # may or may not have a known gender
    }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en language
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?gender") v1("?item"):::projected v2("?survey") c6(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P31"--> c2 v1 --"wdt:P4478"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P21".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end