query-1d3e85b6d3dd5f2747469c5b49fcbbd9

rq turtle/ttl

Propertiesfield of work (P101)start time (P580)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (COUNT(?field) AS ?numFields) (GROUP_CONCAT(?fieldname) AS ?fields)
WHERE {
  ?item p:P101 ?stmt. 
  ?stmt ps:P101 ?field;
        pq:P580 ?starttime.
  ?field rdfs:label ?fieldname FILTER(LANG(?fieldname)="en")
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel
HAVING(?numFields>1)
ORDER BY DESC(?numFields) 
LIMIT 10

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?field"):::projected v2("?fieldname"):::projected v7("?fields") v3("?item"):::projected v7("?numFields") v6("?starttime") v4("?stmt") c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?numFields > '1^^xsd:integer'"]] f0 --> v7 f1[["?fieldname = 'en'"]] f1 --> v2 v3 --"p:P101"--> v4 v4 --"p:statement/P101"--> v5 v4 --"p:qualifier/P580"--> v6 v5 --"rdfs:label"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind4[/"count(?field)"/] v5 --o bind4 bind4 --as--o v7 bind5[/"?fieldname"/] v2 --o bind5 bind5 --as--o v7