Difference between revisions of "Item talk:Q1308"

From Wikibase Personal data
Jump to navigation Jump to search
(Created page with "{{SPARQL|query=SELECT ?item ?itemLabel ?dsLabel ?target ?targetLabel ?event ?eventLabel WHERE { ?item pdiot:P3 pdio:Q1308. OPTIONAL {?item pdiot:P229 ?ds.} OPTIONAL {?it...")
 
 
Line 1: Line 1:
{{SPARQL|query=SELECT ?item ?itemLabel ?dsLabel ?target ?targetLabel ?event ?eventLabel WHERE {
+
{{SPARQL|query=SELECT ?item ?itemLabel ?dsLabel ?target ?targetLabel ?event ?eventLabel ?date ?comment WHERE {
 
   ?item pdiot:P3 pdio:Q1308.
 
   ?item pdiot:P3 pdio:Q1308.
 
   OPTIONAL {?item pdiot:P229 ?ds.}
 
   OPTIONAL {?item pdiot:P229 ?ds.}
 
   OPTIONAL {?item pdiot:P99 ?target.}
 
   OPTIONAL {?item pdiot:P99 ?target.}
   OPTIONAL {?item pdiot:P136 ?event.}
+
   OPTIONAL {
 +
    ?item pdiop:P136 ?eventStatement.
 +
    ?eventStatement pdiops:P136 ?event.
 +
    OPTIONAL {?eventStatement pdiopq:P100 ?date}.
 +
    OPTIONAL {?eventStatement pdiopq:P126 ?comment}.
 +
  }
 
   SERVICE wikibase:label {bd:serviceParam wikibase:language "en" . }
 
   SERVICE wikibase:label {bd:serviceParam wikibase:language "en" . }
 
}
 
}
LIMIT 100
+
ORDER BY DESC(?date)
 
}}
 
}}

Latest revision as of 22:35, 11 January 2020

PREFIX pdio: <https://wiki.personaldata.io/entity/>
PREFIX pdiot: <https://wiki.personaldata.io/prop/direct/>
PREFIX pdiop: <https://wiki.personaldata.io/prop/>
PREFIX pdiops: <https://wiki.personaldata.io/prop/statement/>
PREFIX pdiopq: <https://wiki.personaldata.io/prop/qualifier/>
SELECT ?item ?itemLabel ?dsLabel ?target ?targetLabel ?event ?eventLabel ?date ?comment WHERE {
  ?item pdiot:P3 pdio:Q1308.
  OPTIONAL {?item pdiot:P229 ?ds.}
  OPTIONAL {?item pdiot:P99 ?target.}
  OPTIONAL {
    ?item pdiop:P136 ?eventStatement.
    ?eventStatement pdiops:P136 ?event.
    OPTIONAL {?eventStatement pdiopq:P100 ?date}.
    OPTIONAL {?eventStatement pdiopq:P126 ?comment}.
  }
  SERVICE wikibase:label {bd:serviceParam wikibase:language "en" . }
}
ORDER BY DESC(?date)

Try it (embedded)