query-ba650cca76dadae320070925f5343112

rq turtle/ttl

TODO

Use at

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 ?woven_fabric ?woven_fabricLabel (group_concat(distinct ?fm1;separator=", ") as ?fm) (group_concat(distinct ?fabrication_methodLabel;separator=", ") as ?fmL) (group_concat(distinct ?mu1;separator=", ") as ?mu) (group_concat(distinct ?material_usedLabel;separator=", ") as ?mul) (group_concat(distinct ?dbs1;separator=", ") as ?dbs) (group_concat(distinct ?described_by_sourceLabel;separator=", ") as ?dbsL) 
WHERE 
{
  ?woven_fabric wdt:P279 wd:Q5295538.
  OPTIONAL { ?woven_fabric wdt:P2079 ?fabrication_method. bind(replace(str(?fabrication_method),"http://www.wikidata.org/entity/","") as ?fm1) }
  OPTIONAL { ?woven_fabric wdt:P186 ?material_used. bind(replace(str(?material_used),"http://www.wikidata.org/entity/","") as ?mu1) }
  OPTIONAL { ?woven_fabric wdt:P1343 ?described_by_source. bind(replace(str(?described_by_source),"http://www.wikidata.org/entity/","") as ?dbs1) }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
                           ?fabrication_method rdfs:label ?fabrication_methodLabel .
                           ?material_used rdfs:label ?material_usedLabel . 
                           ?described_by_source rdfs:label ?described_by_sourceLabel .
                           ?woven_fabric rdfs:label ?woven_fabricLabel . }
} group by ?woven_fabric ?woven_fabricLabel
LIMIT 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v16("?dbs") v7("?dbs1"):::projected v17("?dbsL") v6("?described_by_source") v10("?described_by_sourceLabel"):::projected v2("?fabrication_method") v8("?fabrication_methodLabel"):::projected v12("?fm") v3("?fm1"):::projected v13("?fmL") v4("?material_used") v9("?material_usedLabel"):::projected v14("?mu") v5("?mu1"):::projected v15("?mul") v1("?woven_fabric"):::projected v11("?woven_fabricLabel"):::projected c7(["bd:serviceParam"]):::iri c2(["wd:Q5295538"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P279"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2079".-> v2 bind0[/"replace(str(?fabrication_method),'http://www.wikidata.org/entity/','')"/] v2 --o bind0 bind0 --as--o v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P186".-> v4 bind1[/"replace(str(?material_used),'http://www.wikidata.org/entity/','')"/] v4 --o bind1 bind1 --as--o v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1343".-> v6 bind2[/"replace(str(?described_by_source),'http://www.wikidata.org/entity/','')"/] v6 --o bind2 bind2 --as--o v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 v2 --"rdfs:label"--> v8 v4 --"rdfs:label"--> v9 v6 --"rdfs:label"--> v10 v1 --"rdfs:label"--> v11 end bind9[/"?fm1"/] v3 --o bind9 bind9 --as--o v12 bind10[/"?fabrication_methodLabel"/] v8 --o bind10 bind10 --as--o v13 bind11[/"?mu1"/] v5 --o bind11 bind11 --as--o v14 bind12[/"?material_usedLabel"/] v9 --o bind12 bind12 --as--o v15 bind13[/"?dbs1"/] v7 --o bind13 bind13 --as--o v16 bind14[/"?described_by_sourceLabel"/] v10 --o bind14 bind14 --as--o v17