query-c28eac7d9e8a27d316282c97544be9ab

rq turtle/ttl

Time a statement was added to an item?Hello, I have the following query that is working fine :

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
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 ?person ?personLabel ?award ?personDescription ?doctorate ?doctorateLabel ?gender ( MIN(?P585base) AS ?P585) (MIN(?P6949base) AS ?P6949) (SAMPLE(?image) as ?image)
WHERE
{
  ?doctorate wdt:P279 wd:Q11415564.
  ?doctorate wdt:P17 wd:Q142.

  ?person p:P166 ?award.
  ?award ps:P166 ?doctorate .

  OPTIONAL {   ?award pq:P585 ?P585base }
  OPTIONAL {   ?award pq:P6949 ?P6949base }
  OPTIONAL {   ?person wdt:P18 ?image }
  OPTIONAL {   ?person wdt:P21 ?gender }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en". }
}

GROUP BY ?person ?personLabel ?award ?personDescription ?doctorate ?doctorateLabel ?gender

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?P585") v4("?P585base"):::projected v9("?P6949") v5("?P6949base"):::projected v3("?award"):::projected v1("?doctorate"):::projected v7("?gender"):::projected v10("?image"):::projected v2("?person"):::projected c12(["bd:serviceParam"]):::iri c2(["wd:Q11415564"]):::iri c14(["fr,en"]):::literal c4(["wd:Q142"]):::iri v1 --"p:direct/P279"--> c2 v1 --"p:direct/P17"--> c4 v2 --"p:P166"--> v3 v3 --"p:statement/P166"--> v1 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P585".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P6949".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P18".-> v10 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P21".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end bind3[/"min(?P585base)"/] v4 --o bind3 bind3 --as--o v8 bind4[/"min(?P6949base)"/] v5 --o bind4 bind4 --as--o v9 bind5[/"sample(?image)"/] v10 --o bind5 bind5 --as--o v10