query-730cfb127115ef01764868549bc71af7
Forges by publication date
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#>
# Collaborative software by creation date
# Author: [[User:Valerio Bozzolan]] and contributors
# Date: 2024
# License: CC 0, public domain
# https://www.wikidata.org/wiki/User:Valerio_Bozzolan
#defaultView:Timeline
SELECT
?item
?itemLabel
((SAMPLE(?image)) AS ?image) # Expose whatever logo. Just one.
((MIN(?pub_date)) AS ?date) # Minimum date. (between publication date and inception).
WHERE
{
# Item MUST be a "forge" or any subclass of it
?item wdt:P31/wdt:P279* wd:Q3077240.
# Item MUST have a publication date or inception date.
?item wdt:P577|wdt:P571 ?pub_date.
# Item MAY have a lovely logo.
OPTIONAL {
?item wdt:P154 ?image.
}
# English label
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
# Group by item
GROUP BY ?item ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?date")
v4("?image"):::projected
v1("?item"):::projected
v2("?pub_date"):::projected
a1((" "))
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q3077240"]):::iri
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P571"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P577"--> v2
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P154".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind2[/"sample(?image)"/]
v4 --o bind2
bind2 --as--o v4
bind3[/"min(?pub_date)"/]
v2 --o bind3
bind3 --as--o v4