query-09f69bf23c78b583ba5bfefe675b6fe9

rq turtle/ttl

List of all links with gender

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?gender ?genderLabel 
WHERE {
  SERVICE wikibase:mwapi {
     bd:serviceParam wikibase:endpoint "en.wikipedia.org";
                     wikibase:api "Generator";
                     mwapi:generator "links";
                     mwapi:titles "Economics";.
     ?item wikibase:apiOutputItem mwapi:item.
  } 
  FILTER BOUND (?item)
  ?item wdt:P31 wd:Q5 . 
  ?item wdt:P21 ?gender . 
  ?item rdfs:label ?itemLabel filter (lang(?itemLabel) = "en") . 
  ?gender rdfs:label ?genderLabel filter (lang(?genderLabel) = "en") .
}
ORDER BY ?gender

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?gender"):::projected v2("?genderLabel"):::projected v4("?item"):::projected v3("?itemLabel"):::projected c11(["Economics"]):::literal c13(["mwapi:item"]):::iri c5(["en.wikipedia.org"]):::literal c3(["bd:serviceParam"]):::iri c15(["wd:Q5"]):::iri c9(["links"]):::literal c7(["Generator"]):::literal f0[["?genderLabel = 'en'"]] f0 --> v2 f1[["?itemLabel = 'en'"]] f1 --> v3 f2[["bound(?item)"]] f2 --> v4 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c3 --"mwapi:endpoint"--> c5 c3 --"mwapi:api"--> c7 c3 --"mwapi:generator"--> c9 c3 --"mwapi:titles"--> c11 v4 --"mwapi:apiOutputItem"--> c13 end v4 --"wdt:P31"--> c15 v4 --"wdt:P21"--> v1 v4 --"rdfs:label"--> v3 v1 --"rdfs:label"--> v2