Wikidata:WikiProject Ancient Greece/Queries
Data Model
Ancient Greek literature
edit#Moralia by Plutarch
SELECT ?ord ?op ?opLabel
WHERE {
?op p:P179 ?ser .
?ser ps:P179 wd:Q21851235 .
OPTIONAL { ?ser pq:P1545 ?ord . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "la". }
}
ORDER BY xsd:integer(?ord)
#Ancient lyric fragments
SELECT ?fragment ?authorLabel ?fragmentLabel ?genreLabel ?dialectLabel
WHERE {
{ ?fragment wdt:P136/wdt:P279* wd:Q1885775 . }
UNION { ?fragment wdt:P136 wd:Q3906966 . }
UNION { ?fragment wdt:P136 wd:Q3164714 . }
?fragment wdt:P50 ?author .
?fragment wdt:P136 ?genre .
?fragment wdt:P407 ?dialect .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,grc" }
} ORDER BY ?authorLabel ?fragmentLabel
#Metrical feet
SELECT
?item ?itemLabel ?metricalPattern
(GROUP_CONCAT(DISTINCT ?instanceLabel; separator=", ") as ?i)
WHERE {
?item wdt:P31/wdt:P279* wd:Q1651051 .
?item wdt:P31 ?instance .
?item wdt:P2552 ?metricalPattern .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it" . ?instance rdfs:label ?instanceLabel . ?item rdfs:label ?itemLabel }
} GROUP BY ?item ?itemLabel ?metricalPattern
Ancient Greek theatre
editAncient Greek tragedy
edit#Ancient Greek tragedies and satyr plays
SELECT ?play ?authorLabel ?playLabel ?genreLabel ?title
WHERE {
?play wdt:P31 wd:Q25379 .
{ ?play wdt:P136 wd:Q34620 . }
UNION { ?play wdt:P136 wd:Q1050848 . }
?play wdt:P50 ?author .
?play wdt:P136 ?genre .
?play wdt:P1476 ?title .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,grc" }
} ORDER BY ?authorLabel
#Works by Aeschylus
SELECT ?item ?itemLabel ?instanceLabel ?genreLabel ?title
WHERE {
{ ?item wdt:P31 wd:Q25379 . } UNION { ?item wdt:P31 ?c .
?c wdt:P279 wd:Q17851719 . } .
?item wdt:P50 wd:Q40939 .
?item wdt:P31 ?instance .
?item wdt:P136 ?genre .
?item wdt:P1476 ?title .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,grc" }
}
Ancient Greek comedy
edit#Ancient Greek comedies
SELECT ?play ?authorLabel ?playLabel ?genreLabel ?title
WHERE {
?play wdt:P31 wd:Q25379 .
{ ?play wdt:P136 wd:Q1100736 }
UNION { ?play wdt:P136 ?instance .
?instance wdt:P279 wd:Q1100736 . }
?play wdt:P50 ?author .
?play wdt:P136 ?genre .
?play wdt:P1476 ?title .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,grc" }
} ORDER BY ?authorLabel
#Attic comic poets
SELECT ?item ?itemLabel ?movementLabel
WHERE {
{ ?item wdt:P135 ?instance .
?instance wdt:P279 wd:Q1100736 .}
?item wdt:P135 ?movement .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it" }
} ORDER BY ?movementLabel
#Works by Aristophanes
SELECT ?item ?itemLabel ?genreLabel (CONCAT(str(1+YEAR(?date)*-1), "BC") as ?yearBC) ?title
WHERE {
?item wdt:P50 wd:Q43353 .
?item wdt:P136 ?genre .
?item wdt:P1191 ?date .
?item wdt:P1476 ?title .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,grc" }
} ORDER BY ?date
Ancient Greek people
edit- Ancient philosophers tree, adapted from Alexander Doria's Ancient philosophers
Ancient philosophers tree
#defaultView:Graph
SELECT DISTINCT ?philosopher ?philosopherLabel ?rgb ?student ?studentLabel
WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS";
gas:in wd:Q913;
gas:linkType wdt:P802;
gas:traversalDirection "Undirected";
gas:out ?philosopher ;
gas:out1 ?depth ;
gas:out2 ?student .
}
?philosopher wdt:P106 wd:Q4964182 . #restricts the query to students that ended up philosophers themselves
?philosopher wdt:P135 ?school .
BIND (
COALESCE(
IF(?school = wd:Q193589, "FF1700", 1/0), # platonism
IF(?school = wd:Q194414, "33FF3B", 1/0), # peripatetician
IF(?school = wd:Q1126340, "BEFAFF", 1/0), # pyrrhonism
IF(?school = wd:Q179541, "C2CFFF", 1/0), # epicurism
IF(?school = wd:Q1395219, "134d83", 1/0), # scepticism
IF(?school = wd:Q48235, "57FFD2", 1/0), # stoicism
IF(?school = wd:Q1145454, "19A2A2", 1/0), # megarism
IF(?school = wd:Q750192, "F5FE66", 1/0), # cyrenaism
IF(?school = wd:Q485459, "D69A00", 1/0), # cynism
IF(?school = wd:Q1350056, "35A219", 1/0), # eretrian school
IF(?school = wd:Q191359, "976031", 1/0), # pythagorism
IF(?school = wd:Q214577, "913194", 1/0), # eleatics
IF(?school = wd:Q178540, "140714", 1/0), # presocratics (same as pluralists)
IF(?school = wd:Q1275113, "140714", 1/0), # pluralists (same as presocratics
IF(?school = wd:Q178668, "d8a31c", 1/0), # atomists
IF(?school = wd:Q3345153, "1c51d8", 1/0), # New Academy
"FFFFFF"
) AS ?rgb
)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Greek mythology
editAll Greek mythological characters
edit#All Greek mythological characters
SELECT ?item ?itemLabel {
?item (wdt:P31/wdt:P279*)?/wdt:P361 wd:Q34726 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}
All Greek Greek mythology related items and some identifiers
edit#All Greek mythology related items and their links to MANTO, Mythoskop, MythsOnMaps
#and ToposText as well as their article in the Realencyclopädie
SELECT DISTINCT ?item ?itemLabel ?REArticle ?MANTO ?Mythoskop ?MythsOnMaps ?ToposText WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item (wdt:P31/wdt:P279*)?/wdt:P361 wd:Q34726 .
OPTIONAL { ?item p:P1343 ?statement .
?statement ps:P1343 wd:Q1138524 .
OPTIONAL { ?statement pq:P805 ?REitem .
?REArticle schema:about ?REitem ;
schema:isPartOf <https://de.wikisource.org/> .}
OPTIONAL { ?statement pq:P958 ?REArticle . } #the RE article exists, but has yet to be made available
}
OPTIONAL { ?item2 wdt:P460 ?item ;
p:P1343 ?statement .
?statement ps:P1343 wd:Q1138524 .
OPTIONAL { ?statement pq:P805 ?REitem .
?REArticle schema:about ?REitem ;
schema:isPartOf <https://de.wikisource.org/> . } #the item isn't described, but another figure to whom it is said to be the same as is described
OPTIONAL { ?statement pq:P958 ?REArticle . } #same as above, but has yet to be made available
}
OPTIONAL { ?item wdt:P9660 wd:Q1138524 .
BIND("N/A" AS ?REArticle) } #if there is no RE article
OPTIONAL { ?item wdt:P9736 ?manto .
wd:P9736 wdt:P1630 ?fmtMANTO .
BIND(IRI(REPLACE(?manto, CONCAT('(',?manto,')'), ?fmtMANTO)) AS ?MANTO) .}
OPTIONAL { ?item wdt:P11946 ?mythoskop .
wd:P11946 wdt:P1630 ?fmtMythoskop .
BIND(IRI(REPLACE(?mythoskop, CONCAT('(',?mythoskop,')'), ?fmtMythoskop)) AS ?Mythoskop) .}
OPTIONAL { ?item wdt:P12402 ?mythsonmaps .
wd:P12402 wdt:P1630 ?fmtMythsOnMaps .
BIND(IRI(REPLACE(?mythsonmaps, CONCAT('(',?mythsonmaps,')'), ?fmtMythsOnMaps)) AS ?MythsOnMaps) .}
OPTIONAL { ?item wdt:P8069 ?topostext .
wd:P8069 wdt:P1630 ?fmtToposText .
BIND(IRI(REPLACE(?topostext, CONCAT('(',?topostext,')'), ?fmtToposText)) AS ?ToposText) .}
}
ORDER BY STR(?itemLabel)