query-072b40d1b9eb6ffb3f0a60f3fd96bc51
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?itemDescription ?sitelinks
WHERE
{
{
SELECT ?item ?sitelinks
WHERE
{
{
SELECT ?item ?sitelinks
WHERE
{
#Minimum sitelinks
?item wikibase:sitelinks ?sitelinks.
FILTER (?sitelinks > 20 )
#Random stuff
# BIND(RAND() AS ?random) . # Using this makes it not random
BIND(SHA512(CONCAT(STR(RAND()), STR(?item))) AS ?random)
}
ORDER BY ?random
LIMIT 1000
}
#Filters to remove undesired entries (templates, categories, ...)
FILTER NOT EXISTS {?item wdt:P31 wd:Q11266439}
FILTER NOT EXISTS {?item wdt:P31 wd:Q97950663}
FILTER NOT EXISTS {?item wdt:P31 wd:Q4167836}
FILTER NOT EXISTS {?item wdt:P31 wd:Q59541917}
FILTER NOT EXISTS {?item wdt:P31 wd:Q14204246}
FILTER NOT EXISTS {?item wdt:P31 wd:Q19842659}
FILTER NOT EXISTS {?item wdt:P373 ?commonsCategory}
FILTER NOT EXISTS {?item wdt:P301 ?categoryMainTopic}
FILTER NOT EXISTS {?item wdt:P31 wd:Q15184295}
FILTER NOT EXISTS {?item wdt:P1423 ?templateHasTopic}
FILTER NOT EXISTS {?item wdt:P910 ?topicMainCategory}
FILTER NOT EXISTS {?item wdt:P31 wd:Q20010800}
FILTER NOT EXISTS {?item wdt:P360 ?isAListOf}
FILTER NOT EXISTS {?item wdt:P31 wd:Q108783631}
FILTER NOT EXISTS {?item wdt:P31 wd:Q11753321}
FILTER NOT EXISTS {?item wdt:P4224 ?categoryContains}
FILTER NOT EXISTS {?item wdt:P971 ?categoryCombinesTopics}
FILTER NOT EXISTS {?item wdt:P31 wd:Q97303168}
FILTER NOT EXISTS {?item wdt:P31 wd:Q59259626}
FILTER NOT EXISTS {?item wdt:P31 wd:Q110010043}
FILTER NOT EXISTS {?item wdt:P31 wd:Q1474116}
FILTER NOT EXISTS {?item wdt:P31 wd:Q15647814}
FILTER NOT EXISTS {?item wdt:P31 wd:Q19887878}
FILTER NOT EXISTS {?item wdt:P31 wd:Q107344376}
FILTER NOT EXISTS {?item wdt:P31 wd:Q36330215}
FILTER NOT EXISTS {?item wdt:P31 wd:Q14296}
FILTER NOT EXISTS {?item wdt:P31 wd:Q42032}
FILTER NOT EXISTS {?item wdt:P2370 ?conversionToSIUnit}
FILTER NOT EXISTS {?item wdt:P31 wd:Q4167410}
#FILTER NOT EXISTS {?item wdt:P31 wd:aaa}
}
LIMIT 100
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?categoryCombinesTopics")
v4("?categoryContains")
v8("?categoryMainTopic")
v9("?commonsCategory")
v2("?conversionToSIUnit")
v5("?isAListOf")
v1("?item"):::projected
v12("?random")
v11("?sitelinks"):::projected
v7("?templateHasTopic")
v6("?topicMainCategory")
c2(["wd:Q4167410"]):::iri
c17(["wd:Q108783631"]):::iri
c26(["wd:Q14204246"]):::iri
c19(["wd:Q20010800"]):::iri
c7(["wd:Q107344376"]):::iri
c10(["wd:Q1474116"]):::iri
c25(["wd:Q19842659"]):::iri
c34(["bd:serviceParam"]):::iri
c11(["wd:Q110010043"]):::iri
c5(["wd:Q14296"]):::iri
c22(["wd:Q15184295"]):::iri
c13(["wd:Q97303168"]):::iri
c6(["wd:Q36330215"]):::iri
c12(["wd:Q59259626"]):::iri
c4(["wd:Q42032"]):::iri
c8(["wd:Q19887878"]):::iri
c16(["wd:Q11753321"]):::iri
c9(["wd:Q15647814"]):::iri
c29(["wd:Q97950663"]):::iri
c27(["wd:Q59541917"]):::iri
c36(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c28(["wd:Q4167836"]):::iri
c30(["wd:Q11266439"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P31"--> e0c2
e0v1("?item"):::projected
e0c2(["wd:Q4167410"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> c2
v1 --"wdt:P31"--> c2
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"wdt:P2370"--> e1v2
e1v2("?conversionToSIUnit"):::projected
e1v1("?item"):::projected
end
f1--EXISTS--> f1e1
f1 --> v1
f1 --> c3
f1 --> v2
v1 --"wdt:P2370"--> v2
f2[["not "]]
subgraph f2e2["Exists Clause"]
e2v1 --"wdt:P31"--> e2c2
e2v1("?item"):::projected
e2c2(["wd:Q42032"]):::iri
end
f2--EXISTS--> f2e2
f2 --> v1
f2 --> c1
f2 --> c4
v1 --"wdt:P31"--> c4
f3[["not "]]
subgraph f3e3["Exists Clause"]
e3v1 --"wdt:P31"--> e3c2
e3v1("?item"):::projected
e3c2(["wd:Q14296"]):::iri
end
f3--EXISTS--> f3e3
f3 --> v1
f3 --> c1
f3 --> c5
v1 --"wdt:P31"--> c5
f4[["not "]]
subgraph f4e4["Exists Clause"]
e4v1 --"wdt:P31"--> e4c2
e4v1("?item"):::projected
e4c2(["wd:Q36330215"]):::iri
end
f4--EXISTS--> f4e4
f4 --> v1
f4 --> c1
f4 --> c6
v1 --"wdt:P31"--> c6
f5[["not "]]
subgraph f5e5["Exists Clause"]
e5v1 --"wdt:P31"--> e5c2
e5v1("?item"):::projected
e5c2(["wd:Q107344376"]):::iri
end
f5--EXISTS--> f5e5
f5 --> v1
f5 --> c1
f5 --> c7
v1 --"wdt:P31"--> c7
f6[["not "]]
subgraph f6e6["Exists Clause"]
e6v1 --"wdt:P31"--> e6c2
e6v1("?item"):::projected
e6c2(["wd:Q19887878"]):::iri
end
f6--EXISTS--> f6e6
f6 --> v1
f6 --> c1
f6 --> c8
v1 --"wdt:P31"--> c8
f7[["not "]]
subgraph f7e7["Exists Clause"]
e7v1 --"wdt:P31"--> e7c2
e7v1("?item"):::projected
e7c2(["wd:Q15647814"]):::iri
end
f7--EXISTS--> f7e7
f7 --> v1
f7 --> c1
f7 --> c9
v1 --"wdt:P31"--> c9
f8[["not "]]
subgraph f8e8["Exists Clause"]
e8v1 --"wdt:P31"--> e8c2
e8v1("?item"):::projected
e8c2(["wd:Q1474116"]):::iri
end
f8--EXISTS--> f8e8
f8 --> v1
f8 --> c1
f8 --> c10
v1 --"wdt:P31"--> c10
f9[["not "]]
subgraph f9e9["Exists Clause"]
e9v1 --"wdt:P31"--> e9c2
e9v1("?item"):::projected
e9c2(["wd:Q110010043"]):::iri
end
f9--EXISTS--> f9e9
f9 --> v1
f9 --> c1
f9 --> c11
v1 --"wdt:P31"--> c11
f10[["not "]]
subgraph f10e10["Exists Clause"]
e10v1 --"wdt:P31"--> e10c2
e10v1("?item"):::projected
e10c2(["wd:Q59259626"]):::iri
end
f10--EXISTS--> f10e10
f10 --> v1
f10 --> c1
f10 --> c12
v1 --"wdt:P31"--> c12
f11[["not "]]
subgraph f11e11["Exists Clause"]
e11v1 --"wdt:P31"--> e11c2
e11v1("?item"):::projected
e11c2(["wd:Q97303168"]):::iri
end
f11--EXISTS--> f11e11
f11 --> v1
f11 --> c1
f11 --> c13
v1 --"wdt:P31"--> c13
f12[["not "]]
subgraph f12e12["Exists Clause"]
e12v1 --"wdt:P971"--> e12v2
e12v2("?categoryCombinesTopics"):::projected
e12v1("?item"):::projected
end
f12--EXISTS--> f12e12
f12 --> v1
f12 --> c14
f12 --> v3
v1 --"wdt:P971"--> v3
f13[["not "]]
subgraph f13e13["Exists Clause"]
e13v1 --"wdt:P4224"--> e13v2
e13v2("?categoryContains"):::projected
e13v1("?item"):::projected
end
f13--EXISTS--> f13e13
f13 --> v1
f13 --> c15
f13 --> v4
v1 --"wdt:P4224"--> v4
f14[["not "]]
subgraph f14e14["Exists Clause"]
e14v1 --"wdt:P31"--> e14c2
e14v1("?item"):::projected
e14c2(["wd:Q11753321"]):::iri
end
f14--EXISTS--> f14e14
f14 --> v1
f14 --> c1
f14 --> c16
v1 --"wdt:P31"--> c16
f15[["not "]]
subgraph f15e15["Exists Clause"]
e15v1 --"wdt:P31"--> e15c2
e15v1("?item"):::projected
e15c2(["wd:Q108783631"]):::iri
end
f15--EXISTS--> f15e15
f15 --> v1
f15 --> c1
f15 --> c17
v1 --"wdt:P31"--> c17
f16[["not "]]
subgraph f16e16["Exists Clause"]
e16v1 --"wdt:P360"--> e16v2
e16v2("?isAListOf"):::projected
e16v1("?item"):::projected
end
f16--EXISTS--> f16e16
f16 --> v1
f16 --> c18
f16 --> v5
v1 --"wdt:P360"--> v5
f17[["not "]]
subgraph f17e17["Exists Clause"]
e17v1 --"wdt:P31"--> e17c2
e17v1("?item"):::projected
e17c2(["wd:Q20010800"]):::iri
end
f17--EXISTS--> f17e17
f17 --> v1
f17 --> c1
f17 --> c19
v1 --"wdt:P31"--> c19
f18[["not "]]
subgraph f18e18["Exists Clause"]
e18v1 --"wdt:P910"--> e18v2
e18v1("?item"):::projected
e18v2("?topicMainCategory"):::projected
end
f18--EXISTS--> f18e18
f18 --> v1
f18 --> c20
f18 --> v6
v1 --"wdt:P910"--> v6
f19[["not "]]
subgraph f19e19["Exists Clause"]
e19v1 --"wdt:P1423"--> e19v2
e19v1("?item"):::projected
e19v2("?templateHasTopic"):::projected
end
f19--EXISTS--> f19e19
f19 --> v1
f19 --> c21
f19 --> v7
v1 --"wdt:P1423"--> v7
f20[["not "]]
subgraph f20e20["Exists Clause"]
e20v1 --"wdt:P31"--> e20c2
e20v1("?item"):::projected
e20c2(["wd:Q15184295"]):::iri
end
f20--EXISTS--> f20e20
f20 --> v1
f20 --> c1
f20 --> c22
v1 --"wdt:P31"--> c22
f21[["not "]]
subgraph f21e21["Exists Clause"]
e21v1 --"wdt:P301"--> e21v2
e21v2("?categoryMainTopic"):::projected
e21v1("?item"):::projected
end
f21--EXISTS--> f21e21
f21 --> v1
f21 --> c23
f21 --> v8
v1 --"wdt:P301"--> v8
f22[["not "]]
subgraph f22e22["Exists Clause"]
e22v1 --"wdt:P373"--> e22v2
e22v2("?commonsCategory"):::projected
e22v1("?item"):::projected
end
f22--EXISTS--> f22e22
f22 --> v1
f22 --> c24
f22 --> v9
v1 --"wdt:P373"--> v9
f23[["not "]]
subgraph f23e23["Exists Clause"]
e23v1 --"wdt:P31"--> e23c2
e23v1("?item"):::projected
e23c2(["wd:Q19842659"]):::iri
end
f23--EXISTS--> f23e23
f23 --> v1
f23 --> c1
f23 --> c25
v1 --"wdt:P31"--> c25
f24[["not "]]
subgraph f24e24["Exists Clause"]
e24v1 --"wdt:P31"--> e24c2
e24v1("?item"):::projected
e24c2(["wd:Q14204246"]):::iri
end
f24--EXISTS--> f24e24
f24 --> v1
f24 --> c1
f24 --> c26
v1 --"wdt:P31"--> c26
f25[["not "]]
subgraph f25e25["Exists Clause"]
e25v1 --"wdt:P31"--> e25c2
e25v1("?item"):::projected
e25c2(["wd:Q59541917"]):::iri
end
f25--EXISTS--> f25e25
f25 --> v1
f25 --> c1
f25 --> c27
v1 --"wdt:P31"--> c27
f26[["not "]]
subgraph f26e26["Exists Clause"]
e26v1 --"wdt:P31"--> e26c2
e26v1("?item"):::projected
e26c2(["wd:Q4167836"]):::iri
end
f26--EXISTS--> f26e26
f26 --> v1
f26 --> c1
f26 --> c28
v1 --"wdt:P31"--> c28
f27[["not "]]
subgraph f27e27["Exists Clause"]
e27v1 --"wdt:P31"--> e27c2
e27v1("?item"):::projected
e27c2(["wd:Q97950663"]):::iri
end
f27--EXISTS--> f27e27
f27 --> v1
f27 --> c1
f27 --> c29
v1 --"wdt:P31"--> c29
f28[["not "]]
subgraph f28e28["Exists Clause"]
e28v1 --"wdt:P31"--> e28c2
e28v1("?item"):::projected
e28c2(["wd:Q11266439"]):::iri
end
f28--EXISTS--> f28e28
f28 --> v1
f28 --> c1
f28 --> c30
v1 --"wdt:P31"--> c30
f29[["?sitelinks > '20^^xsd:integer'"]]
f29 --> v11
v1 --"wikibase:sitelinks"--> v11
bind30[/"SHA512(concat(str(RAND()),str(?item)))"/]
v1 --o bind30
bind30 --as--o v12
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c34 --"wikibase:language"--> c36
end