query-1db6405262e7d581f2dba6f03ca21619

rq turtle/ttl

Ancient history query

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
            SELECT DISTINCT ?item ?itemLabel ?itemDescription ?geo ?img ?commons ?instanceOf ?instanceOfLabel ?sitelink WHERE {
              # "instance of" "Roman amphitheatre" or(UNION) "Greek theatre" or one of it's subclasses(/wdt:P279*)
              {?item wdt:P31/wdt:P279* wd:Q7362268.} #Roman amphitheatre
              UNION {?item wdt:P31/wdt:P279* wd:Q2860319} #Greek Theater
              UNION {?item wdt:P31/wdt:P279* wd:Q69391739} #Greek colony
              UNION {?item wdt:P31/wdt:P279* wd:Q24933318} #Galo-roman amphiteaters
              UNION {?item wdt:P31/wdt:P279* wd:Q6581615} #Thermae
              UNION {?item wdt:P31/wdt:P279* wd:Q19757} #Roman theatre
              UNION {?item wdt:P31/wdt:P279* wd:Q867143} #Roman temple
              UNION {?item wdt:P31/wdt:P279* wd:Q918230} #Roman villa
              UNION {?item wdt:P31/wdt:P279* wd:Q2202509} #Roman city
              UNION {?item wdt:P31/wdt:P279* wd:Q782970} #domus 
              UNION {?item wdt:P31/wdt:P279* wd:Q252021} #villa rustica
              UNION {?item wdt:P31/wdt:P279* wd:Q180927} #mastaba 
              UNION {?item wdt:P31/wdt:P279* wd:Q2270185} #Mesoamerican pyramids 
              UNION {?item wdt:P31/wdt:P279* wd:Q1456099} #step pyramid
              UNION {?item wdt:P31/wdt:P279* wd:Q731966} #nymphaeum 
              UNION {?item wdt:P361/wdt:P279* wd:Q38888} #Olympia 
              UNION {?item wdt:P361/wdt:P279* wd:Q43332} #Pompeii 
              UNION {?item wdt:P31/wdt:P279* wd:Q6581615} #thermae  
              UNION {?item wdt:P31/wdt:P279* wd:Q1473950} #stepwell 
              UNION {?item wdt:P31/wdt:P279* wd:Q3411290} #smooth-sided pyramid
              UNION {?item wdt:P31/wdt:P279* wd:Q200141} #necropolis v
              UNION {?item wdt:P31/wdt:P279* wd:Q877152} #White elephant
              UNION {?item wdt:P31/wdt:P279* wd:Q12223988} #sphinx 
              UNION {?item wdt:P31/wdt:P279* wd:Q66108498} #Wonder of the Ancient World
              UNION {?item wdt:P31/wdt:P279* wd:Q13466456} #house of millions of years
              UNION {?item wdt:P31/wdt:P279* wd:Q665247} #hypogeum 
              UNION {?item wdt:P179/wdt:P279* wd:Q458082} #list of burials in the Valley of the Kings
              UNION {?item wdt:P179/wdt:P279* wd:Q690551} #list of Theban Tombs
              UNION {?item wdt:P136/wdt:P279* wd:Q6611811} #list of colossal sculpture in situ
              UNION {?item wdt:P31/wdt:P279* wd:Q855747} #Egyptian temple 
              UNION {?item wdt:P31/wdt:P279* wd:Q15661340} #ancient city 
              UNION {?item wdt:P361/wdt:P279* wd:Q5788} #Petra  
              UNION {?item wdt:P5008/wdt:P279* wd:Q68074438} #WikiProject Livius 
              UNION {?item wdt:P2596/wdt:P279* wd:Q220594} #Nabataeans  
              UNION {?item wdt:P361/wdt:P279* wd:Q163607} #Angkor 
              UNION {?item wdt:P361/wdt:P279* wd:Q1493784} #Chemtou, archaeological site in Tunisia 
              UNION {?item wdt:P361/wdt:P279* wd:Q3378708} #Pheradi Majius
              UNION {
                ?romanArchio wdt:P2596 wd:Q1747689. #everything Ancient Rome
                ?romanArchio wdt:P625 ?notRelavant. #Only keep thing with a location
                ?item wd:* ?romanArchio. #add them to item
              } # Anicent Roman Locations
                UNION {
                ?romanCity wdt:P31/wdt:P279* wd:Q2202509. #everything Ancient Rome
                ?romanCity wdt:P625 ?notRelavant. #Only keep archiological site
                ?item wd:* ?romanCity. #add them to item
              }  
              ?item wdt:P625 ?geo . #Filter on "has a location"
              OPTIONAL {?item wdt:P18 ?img}. # if result has a location, get it
              OPTIONAL {?item wdt:P373 ?commons}. # wiki commons img categorie
              OPTIONAL {?item wdt:P31 ?instanceOf}. #Hat is it part of?
              OPTIONAL { ?sitelink schema:about ?item.
                ?sitelink schema:isPartOf <https://en.wikipedia.org/>. }

              SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

            }
            LIMIT 10000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?commons"):::projected v5("?geo"):::projected v6("?img"):::projected v8("?instanceOf"):::projected v1("?item"):::projected v3("?notRelavant") v2("?romanArchio") v4("?romanCity") v9("?sitelink"):::projected a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) a6((" ")) a7((" ")) a8((" ")) a9((" ")) a10((" ")) a11((" ")) a12((" ")) a13((" ")) a14((" ")) a15((" ")) a16((" ")) a17((" ")) a18((" ")) a19((" ")) a20((" ")) a21((" ")) a22((" ")) a23((" ")) a24((" ")) a25((" ")) a26((" ")) a27((" ")) a28((" ")) a29((" ")) a30((" ")) a31((" ")) a32((" ")) a33((" ")) a34((" ")) a35((" ")) a36((" ")) a37((" ")) a38((" ")) c5(["wd:Q69391739"]):::iri c24(["wd:Q877152"]):::iri c43(["wd:Q3378708"]):::iri c6(["wd:Q24933318"]):::iri c51([https://en.wikipedia.org/]):::iri c35(["wd:Q15661340"]):::iri c4(["wd:Q2860319"]):::iri c19(["wd:Q38888"]):::iri c28(["wd:Q665247"]):::iri c16(["wd:Q1456099"]):::iri c11(["wd:Q2202509"]):::iri c30(["wd:Q458082"]):::iri c40(["wd:Q220594"]):::iri c7(["wd:Q6581615"]):::iri c12(["wd:Q782970"]):::iri c15(["wd:Q2270185"]):::iri c55(["#91;AUTO_LANGUAGE#93;,en"]):::literal c38(["wd:Q68074438"]):::iri c34(["wd:Q855747"]):::iri c20(["wd:Q43332"]):::iri c27(["wd:Q13466456"]):::iri c3(["wd:Q7362268"]):::iri c53(["bd:serviceParam"]):::iri c33(["wd:Q6611811"]):::iri c36(["wd:Q5788"]):::iri c22(["wd:Q3411290"]):::iri c21(["wd:Q1473950"]):::iri c25(["wd:Q12223988"]):::iri c13(["wd:Q252021"]):::iri c26(["wd:Q66108498"]):::iri c42(["wd:Q1493784"]):::iri c9(["wd:Q867143"]):::iri c23(["wd:Q200141"]):::iri c10(["wd:Q918230"]):::iri c41(["wd:Q163607"]):::iri c14(["wd:Q180927"]):::iri c44(["wd:Q1747689"]):::iri c8(["wd:Q19757"]):::iri c17(["wd:Q731966"]):::iri c31(["wd:Q690551"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; subgraph union5[" Union "] subgraph union5l[" "] style union5l fill:#abf,stroke-dasharray: 3 3; subgraph union6[" Union "] subgraph union6l[" "] style union6l fill:#abf,stroke-dasharray: 3 3; subgraph union7[" Union "] subgraph union7l[" "] style union7l fill:#abf,stroke-dasharray: 3 3; subgraph union8[" Union "] subgraph union8l[" "] style union8l fill:#abf,stroke-dasharray: 3 3; subgraph union9[" Union "] subgraph union9l[" "] style union9l fill:#abf,stroke-dasharray: 3 3; subgraph union10[" Union "] subgraph union10l[" "] style union10l fill:#abf,stroke-dasharray: 3 3; subgraph union11[" Union "] subgraph union11l[" "] style union11l fill:#abf,stroke-dasharray: 3 3; subgraph union12[" Union "] subgraph union12l[" "] style union12l fill:#abf,stroke-dasharray: 3 3; subgraph union13[" Union "] subgraph union13l[" "] style union13l fill:#abf,stroke-dasharray: 3 3; subgraph union14[" Union "] subgraph union14l[" "] style union14l fill:#abf,stroke-dasharray: 3 3; subgraph union15[" Union "] subgraph union15l[" "] style union15l fill:#abf,stroke-dasharray: 3 3; subgraph union16[" Union "] subgraph union16l[" "] style union16l fill:#abf,stroke-dasharray: 3 3; subgraph union17[" Union "] subgraph union17l[" "] style union17l fill:#abf,stroke-dasharray: 3 3; subgraph union18[" Union "] subgraph union18l[" "] style union18l fill:#abf,stroke-dasharray: 3 3; subgraph union19[" Union "] subgraph union19l[" "] style union19l fill:#abf,stroke-dasharray: 3 3; subgraph union20[" Union "] subgraph union20l[" "] style union20l fill:#abf,stroke-dasharray: 3 3; subgraph union21[" Union "] subgraph union21l[" "] style union21l fill:#abf,stroke-dasharray: 3 3; subgraph union22[" Union "] subgraph union22l[" "] style union22l fill:#abf,stroke-dasharray: 3 3; subgraph union23[" Union "] subgraph union23l[" "] style union23l fill:#abf,stroke-dasharray: 3 3; subgraph union24[" Union "] subgraph union24l[" "] style union24l fill:#abf,stroke-dasharray: 3 3; subgraph union25[" Union "] subgraph union25l[" "] style union25l fill:#abf,stroke-dasharray: 3 3; subgraph union26[" Union "] subgraph union26l[" "] style union26l fill:#abf,stroke-dasharray: 3 3; subgraph union27[" Union "] subgraph union27l[" "] style union27l fill:#abf,stroke-dasharray: 3 3; subgraph union28[" Union "] subgraph union28l[" "] style union28l fill:#abf,stroke-dasharray: 3 3; subgraph union29[" Union "] subgraph union29l[" "] style union29l fill:#abf,stroke-dasharray: 3 3; subgraph union30[" Union "] subgraph union30l[" "] style union30l fill:#abf,stroke-dasharray: 3 3; subgraph union31[" Union "] subgraph union31l[" "] style union31l fill:#abf,stroke-dasharray: 3 3; subgraph union32[" Union "] subgraph union32l[" "] style union32l fill:#abf,stroke-dasharray: 3 3; subgraph union33[" Union "] subgraph union33l[" "] style union33l fill:#abf,stroke-dasharray: 3 3; subgraph union34[" Union "] subgraph union34l[" "] style union34l fill:#abf,stroke-dasharray: 3 3; subgraph union35[" Union "] subgraph union35l[" "] style union35l fill:#abf,stroke-dasharray: 3 3; subgraph union36[" Union "] subgraph union36l[" "] style union36l fill:#abf,stroke-dasharray: 3 3; subgraph union37[" Union "] subgraph union37l[" "] style union37l fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P31"--> a38 a38 --"wdt:P279"--> c11 v4 --"wdt:P625"--> v3 v1 --"wd:"--> v4 end subgraph union37r[" "] style union37r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P2596"--> c44 v2 --"wdt:P625"--> v3 v1 --"wd:"--> v2 end union37r <== or ==> union37l end end subgraph union36r[" "] style union36r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P361"--> a37 a37 --"wdt:P279"--> c43 end union36r <== or ==> union36l end end subgraph union35r[" "] style union35r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P361"--> a36 a36 --"wdt:P279"--> c42 end union35r <== or ==> union35l end end subgraph union34r[" "] style union34r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P361"--> a35 a35 --"wdt:P279"--> c41 end union34r <== or ==> union34l end end subgraph union33r[" "] style union33r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P2596"--> a34 a34 --"wdt:P279"--> c40 end union33r <== or ==> union33l end end subgraph union32r[" "] style union32r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P5008"--> a33 a33 --"wdt:P279"--> c38 end union32r <== or ==> union32l end end subgraph union31r[" "] style union31r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P361"--> a32 a32 --"wdt:P279"--> c36 end union31r <== or ==> union31l end end subgraph union30r[" "] style union30r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a31 a31 --"wdt:P279"--> c35 end union30r <== or ==> union30l end end subgraph union29r[" "] style union29r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a30 a30 --"wdt:P279"--> c34 end union29r <== or ==> union29l end end subgraph union28r[" "] style union28r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P136"--> a29 a29 --"wdt:P279"--> c33 end union28r <== or ==> union28l end end subgraph union27r[" "] style union27r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P179"--> a28 a28 --"wdt:P279"--> c31 end union27r <== or ==> union27l end end subgraph union26r[" "] style union26r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P179"--> a27 a27 --"wdt:P279"--> c30 end union26r <== or ==> union26l end end subgraph union25r[" "] style union25r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a26 a26 --"wdt:P279"--> c28 end union25r <== or ==> union25l end end subgraph union24r[" "] style union24r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a25 a25 --"wdt:P279"--> c27 end union24r <== or ==> union24l end end subgraph union23r[" "] style union23r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a24 a24 --"wdt:P279"--> c26 end union23r <== or ==> union23l end end subgraph union22r[" "] style union22r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a23 a23 --"wdt:P279"--> c25 end union22r <== or ==> union22l end end subgraph union21r[" "] style union21r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a22 a22 --"wdt:P279"--> c24 end union21r <== or ==> union21l end end subgraph union20r[" "] style union20r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a21 a21 --"wdt:P279"--> c23 end union20r <== or ==> union20l end end subgraph union19r[" "] style union19r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a20 a20 --"wdt:P279"--> c22 end union19r <== or ==> union19l end end subgraph union18r[" "] style union18r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a19 a19 --"wdt:P279"--> c21 end union18r <== or ==> union18l end end subgraph union17r[" "] style union17r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a18 a18 --"wdt:P279"--> c7 end union17r <== or ==> union17l end end subgraph union16r[" "] style union16r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P361"--> a17 a17 --"wdt:P279"--> c20 end union16r <== or ==> union16l end end subgraph union15r[" "] style union15r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P361"--> a16 a16 --"wdt:P279"--> c19 end union15r <== or ==> union15l end end subgraph union14r[" "] style union14r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a15 a15 --"wdt:P279"--> c17 end union14r <== or ==> union14l end end subgraph union13r[" "] style union13r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a14 a14 --"wdt:P279"--> c16 end union13r <== or ==> union13l end end subgraph union12r[" "] style union12r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a13 a13 --"wdt:P279"--> c15 end union12r <== or ==> union12l end end subgraph union11r[" "] style union11r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a12 a12 --"wdt:P279"--> c14 end union11r <== or ==> union11l end end subgraph union10r[" "] style union10r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a11 a11 --"wdt:P279"--> c13 end union10r <== or ==> union10l end end subgraph union9r[" "] style union9r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a10 a10 --"wdt:P279"--> c12 end union9r <== or ==> union9l end end subgraph union8r[" "] style union8r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a9 a9 --"wdt:P279"--> c11 end union8r <== or ==> union8l end end subgraph union7r[" "] style union7r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a8 a8 --"wdt:P279"--> c10 end union7r <== or ==> union7l end end subgraph union6r[" "] style union6r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a7 a7 --"wdt:P279"--> c9 end union6r <== or ==> union6l end end subgraph union5r[" "] style union5r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a6 a6 --"wdt:P279"--> c8 end union5r <== or ==> union5l end end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a5 a5 --"wdt:P279"--> c7 end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a4 a4 --"wdt:P279"--> c6 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a3 a3 --"wdt:P279"--> c5 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c4 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 end union0r <== or ==> union0l end v1 --"wdt:P625"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P373".-> v7 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P31".-> v8 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v9 -."schema:about".-> v1 v9 --"schema:isPartOf"--> c51 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c53 --"wikibase:language"--> c55 end