SELECT ?city ?cityLabel
(GROUP_CONCAT(DISTINCT ?date; separator="; ") AS ?Inception)
(GROUP_CONCAT(DISTINCT ?locationLabel; separator="; ") AS ?LocatedIn)
(GROUP_CONCAT(DISTINCT ?website; separator="; ") AS ?OfficialWebsite)
WHERE {
?city wdt:P31 wd:Q3918 ; # instance of = university
wdt:P17 wd:Q794 . # country = Iran
OPTIONAL {
?article_ckb schema:about ?city.
?article_ckb schema:inLanguage "ckb".
?article_ckb schema:isPartOf <https://ckb.wikipedia.org/>.
}
FILTER(!BOUND(?article_ckb)) # Exclude cities with articles in ckb Wikipedia
# Fetch labels
?city rdfs:label ?cityLabel .
FILTER(LANG(?cityLabel) = "en") # Ensure the label is in English
# Fetch additional properties
OPTIONAL { ?city wdt:P571 ?date . } # P571 (inception)
OPTIONAL {
?city wdt:P131 ?location . # P131 (located in the administrative entity)
?location rdfs:label ?locationLabel .
FILTER(LANG(?locationLabel) = "en") # Ensure location label is in English
}
OPTIONAL { ?city wdt:P856 ?website . } # P856 (official website)
# Merge values for the properties
BIND(LCASE(?cityLabel) AS ?lowerCityLabel)
FILTER(CONTAINS(?lowerCityLabel, "medical")) # Case-insensitive search for "medical" in the English label
}
GROUP BY ?city ?cityLabel