query-b586097a476f03f54b90e96b3b36b8d2

rq turtle/ttl

Question 14:51, 23 February 2021 (UTC)) talk (Simon Villeneuve. Someone can explain this to me? I try to get all the direction entries and know the percentages of them who are male and female. (wdt:P1037|wdt:P169|wdt:P8938) ?directionI don't know why I have 126 results in the first query and 33 in the second for Hi,

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?directionLabel ?direction
WHERE 
{
  ?item ?ppp ?statement . 
   ?property a wikibase:Property ;
     wikibase:claim ?ppp . 

  ?statement ?qqq ?value.
   ?property2 a wikibase:Property ;
     wikibase:statementProperty  ?qqq . 

  ?statement prov:wasDerivedFrom ?autre_statement. #d'après la source ...
  ?autre_statement pr:P248 wd:Q100443909 .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    ?item wdt:P31 / wdt:P279* wd:Q43229 ;
          (wdt:P1037|wdt:P169|wdt:P8938) ?direction .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?autre_statement") v9("?direction"):::projected v1("?item"):::projected v2("?ppp") v4("?property") v7("?property2") v5("?qqq") v3("?statement") v6("?value") a1((" ")) c2(["wikibase:Property"]):::iri c14(["wd:Q43229"]):::iri c9(["bd:serviceParam"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal c7(["wd:Q100443909"]):::iri v1 -->v2--> v3 v4 --"a"--> c2 v4 --"wikibase:claim"--> v2 v3 -->v5--> v6 v7 --"a"--> c2 v7 --"wikibase:statementProperty"--> v5 v3 --"prov:wasDerivedFrom"--> v8 v8 --"pr:P248"--> c7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c14 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P8938"--> v9 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P169"--> v9 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P1037"--> v9 end union0r <== or ==> union0l end