query-5c147be0c64a85608309c317b47bf102

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?family (COUNT(?site) AS ?count) (GROUP_CONCAT(?sitey;SEPARATOR=', ') AS ?sites) {
  VALUES ?item { wd:Q5645580 wd:Q6010682 wd:Q9703849 }
  ?site schema:about ?item . 
  BIND(STRAFTER(STRBEFORE(STR(?site),'.org'),'//') AS ?sitex)
  BIND(STRAFTER(?sitex,'.') AS ?family)
  BIND(STRBEFORE(?sitex,'.') AS ?sitey)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?sitelinks ?family
ORDER BY ?itemLabel ?family

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?count") v6("?family"):::projected v3("?item"):::projected v1("?itemLabel"):::projected v4("?site"):::projected v8("?sites") v5("?sitex") v6("?sitey"):::projected c3(["bd:serviceParam"]):::iri c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/VALUES ?item/] bind0-->v3 bind00(["wd:Q5645580"]) bind00 --> bind0 bind01(["wd:Q6010682"]) bind01 --> bind0 bind02(["wd:Q9703849"]) bind02 --> bind0 v4 --"schema:about"--> v3 bind1[/"substring-after(substring-before(str(?site),'.org'),'//')"/] v4 --o bind1 bind1 --as--o v5 bind2[/"substring-after(?sitex,'.')"/] v5 --o bind2 bind2 --as--o v6 bind3[/"substring-before(?sitex,'.')"/] v5 --o bind3 bind3 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 end bind6[/"count(?site)"/] v4 --o bind6 bind6 --as--o v7 bind7[/"?sitey"/] v6 --o bind7 bind7 --as--o v8