query-f1142fc94751ca97be07848a3a4ec752
All format violations
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?statement ?prop ?pattern ?value WHERE {
{
SELECT * {
?prop wikibase:statementProperty ?pred;
#wikibase:qualifier ?pred;
#wikibase:reference ?pred;
wikibase:propertyType wikibase:ExternalId;
p:P2302 [ ps:P2302 wd:Q21502404; a wikibase:BestRank; pq:P1793 ?regex ] .
FILTER( ?prop NOT IN ( wd:P494, wd:P782, wd:P1238, wd:P1388, wd:P1821, wd:P1947, wd:P1997, wd:P2186, wd:P3054, wd:P3628, wd:P3668, wd:P3682, wd:P3799, wd:P3959, wd:P4415, wd:P5404, wd:P7775 ) ) .
# qualifier FILTER( ?propĀ != wd:P6552 ) . # somevalue
# reference FILTER( ?prop NOT IN ( wd:P2037, wd:P2249, wd:P3668 ) ) .
FILTER( !REGEX( ?regex, '\\\\[1-9]' ) ) . # TODO: back-references
BIND( CONCAT( '^(', ?regex, ')$' ) AS ?pattern ) .
}
}.
?statement ?pred ?value; a wikibase:BestRank .
#?statement prov:wasDerivedFrom [ ?pred ?value ]; a wikibase:BestRank .
FILTER( !REGEX( IF( wikibase:isSomeValue( ?value ), '', STR( ?value ) ), ?pattern ) ) .
} LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?pattern"):::projected
v5("?pred")
v4("?prop"):::projected
v3("?regex")
v6("?statement"):::projected
v1("?value"):::projected
a1((" "))
c26(["wikibase:BestRank"]):::iri
c22(["wikibase:ExternalId"]):::iri
c24(["wd:Q21502404"]):::iri
f0[["not regex(if(http://wikiba.se/ontology#isSomeValue(?value),'',str(?value)),?pattern)"]]
f0 --> v1
f0 --> v6
f1[["not regex(?regex,'\\#91;1-9#93;')"]]
f1 --> v3
f2[["?prop != 'wd:P494'?prop != 'wd:P782'?prop != 'wd:P1238'?prop != 'wd:P1388'?prop != 'wd:P1821'?prop != 'wd:P1947'?prop != 'wd:P1997'?prop != 'wd:P2186'?prop != 'wd:P3054'?prop != 'wd:P3628'?prop != 'wd:P3668'?prop != 'wd:P3682'?prop != 'wd:P3799'?prop != 'wd:P3959'?prop != 'wd:P4415'?prop != 'wd:P5404'?prop != 'wd:P7775'"]]
f2 --> v4
v4 --"wikibase:statementProperty"--> v5
v4 --"wikibase:propertyType"--> c22
a1 --"p:statement/P2302"--> c24
a1 --"a"--> c26
a1 --"p:qualifier/P1793"--> v3
v4 --"p:P2302"--> a1
bind3[/"concat('^(',?regex,')$')"/]
v3 --o bind3
bind3 --as--o v6
v6 -->v5--> v1
v6 --"a"--> c26