query-2f3ff33bf896df4c7efb566ed69967a3

rq turtle/ttl

Councils in Bergen, Norway P1001 SELECT ?item ?inception ?place ?LabelEN ?LabelDE ?Label (SAMPLE(?Website) AS ?Website) (COUNT(?Website) AS ?nWebsites) (SAMPLE(?nSeats) AS ?nSeats) WHERE { ?item wdt:P31 wd:Q3154693 . ?item wdt:P361 wd:Q26793 . ?item wdt:P571 ?inception . OPTIONAL{?item wdt:P1001 ?place .} #OPTIONAL{?place rdfs:label ?placeLabel .} OPTIONAL{?item wdt:P856 ?Website .} OPTIONAL{?item wdt:P1342 ?nSeats .} SERVICE wikibase:label { bd:serviceParam wikibase:language "hu". ?item rdfs:label ?LabelHU } . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?item rdfs:label ?LabelEN } . SERVICE wikibase:label { bd:serviceParam wikibase:language "de" . ?item rdfs:label ?LabelDE } . SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,ar,be,bg,bn,ca,cs,da,de,el,en,es,et,fa,fi,he,hi,hu,hy,id,it,ja,jv,ko,nb,nl,eo,pa,pl,pt,ro,ru,sh,sk,sr,sv,sw,te,th,tr,uk,yue,vec,vi,zh" . ?item rdfs:label ?Label } } GROUP BY ?item ?inception ?place ?LabelEN ?LabelDE ?Label order by ?inception

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#>
#Councils in Bergen, Norway P1001
SELECT ?item ?inception ?place ?LabelEN ?LabelDE ?Label (SAMPLE(?Website) AS ?Website) (COUNT(?Website) AS ?nWebsites) (SAMPLE(?nSeats) AS ?nSeats)
WHERE
{
    ?item wdt:P31 wd:Q3154693 .
    ?item wdt:P361 wd:Q26793 .
    ?item wdt:P571 ?inception .
    OPTIONAL{?item wdt:P1001 ?place .}
    #OPTIONAL{?place rdfs:label ?placeLabel .}
    OPTIONAL{?item wdt:P856 ?Website .}
    OPTIONAL{?item wdt:P1342 ?nSeats .}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "hu". ?item rdfs:label ?LabelHU } .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?item rdfs:label ?LabelEN } .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "de" . ?item rdfs:label ?LabelDE } .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,ar,be,bg,bn,ca,cs,da,de,el,en,es,et,fa,fi,he,hi,hu,hy,id,it,ja,jv,ko,nb,nl,eo,pa,pl,pt,ro,ru,sh,sk,sr,sv,sw,te,th,tr,uk,yue,vec,vi,zh" 
 . ?item rdfs:label ?Label }
}
GROUP BY ?item ?inception ?place ?LabelEN ?LabelDE ?Label
order by ?inception

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?Label"):::projected v8("?LabelDE"):::projected v7("?LabelEN"):::projected v6("?LabelHU") v10("?Website"):::projected v1("?inception"):::projected v2("?item"):::projected v11("?nSeats"):::projected v10("?nWebsites") v3("?place"):::projected c15(["de"]):::literal c16(["fr,ar,be,bg,bn,ca,cs,da,de,el,en,es,et,fa,fi,he,hi,hu,hy,id,it,ja,jv,ko,nb,nl,eo,pa,pl,pt,ro,ru,sh,sk,sr,sv,sw,te,th,tr,uk,yue,vec,vi,zh"]):::literal c4(["wd:Q26793"]):::iri c14(["en"]):::literal c12(["hu"]):::literal c10(["bd:serviceParam"]):::iri c2(["wd:Q3154693"]):::iri v2 --"wdt:P31"--> c2 v2 --"wdt:P361"--> c4 v2 --"wdt:P571"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1001".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P856".-> v10 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1342".-> v11 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 v2 --"rdfs:label"--> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c14 v2 --"rdfs:label"--> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c15 v2 --"rdfs:label"--> v8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c16 v2 --"rdfs:label"--> v9 end bind3[/"sample(?Website)"/] v10 --o bind3 bind3 --as--o v10 bind4[/"count(?Website)"/] v10 --o bind4 bind4 --as--o v10 bind5[/"sample(?nSeats)"/] v11 --o bind5 bind5 --as--o v11