Wikidata:WikiProject Ancient Greece/Queries

From Wikidata
Jump to navigation Jump to search

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)
Try it!
#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
Try it!
#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
Try it!

Ancient Greek theatre[edit]

Ancient 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
Try it!
#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"  }    
}
Try it!

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
Try it!
#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
Try it!
#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
Try it!

Greek mythology[edit]

All 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" } .
}
Try it!

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)
Try it!