query-88fd29bc122d6e534b62d1bb46e413ae

rq turtle/ttl

Bind in Select

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item (GROUP_CONCAT(STR(?rec); SEPARATOR=", ") AS ?recs) ?data (IF(BOUND(?irisid),"SÌ","NO") AS ?iris)
WHERE {
  ?item p:P227 ?v .
  OPTIONAL { ?item ?irisst ?irisid . ?iris wikibase:directClaim ?irisst ; wdt:P1629 [ wdt:P408 wd:Q107492957 ] . } .
  ?v a wdno:P227 ; prov:wasDerivedFrom [ pr:P854 ?rec ; pr:P813 ?data ] .
  FILTER ("2023-01-31"^^xsd:date < ?data && ?data < "2023-03-01"^^xsd:dat)
}
GROUP BY ?item ?data ?irisid

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?data"):::projected v9("?iris") v5("?irisid"):::projected v4("?irisst") v2("?item"):::projected v7("?rec"):::projected v8("?recs") v3("?v") a1((" ")) a2((" ")) c9(["p:novalue/P227"]):::iri c6(["wd:Q107492957"]):::iri f0[["'2023-01-31^^xsd:date' < ?data?data < s2023-03-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f0 --> v1 v2 --"p:P227"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -->v4--> v5 v9 -."wikibase:directClaim".-> v4 a1 --"p:direct/P408"--> c6 v9 --"p:direct/P1629"--> a1 end v3 --"a"--> c9 a2 --"p:reference/P854"--> v7 a2 --"p:reference/P813"--> v1 v3 --"prov:wasDerivedFrom"--> a2 bind2[/"str(?rec)"/] v7 --o bind2 bind2 --as--o v8 bind3[/"if(bound(?irisid),'SÌ','NO')"/] v5 --o bind3 bind3 --as--o v9