Give me {spiral galaxy} that {constellation} {Andromeda} and which contains the word {ugc} in their name
WHat is where you a discover the Andromeda star grouping that contains the word " ugc" in its name ?
WHat is the galaxy where you an find the Andromeda constellation that contains the word " ugc" in its name ?
SELECT DISTINCT ?x WHERE { ?x property:constellation resource:Andromeda . ?x rdf:type ontology:spiral_galaxy . FILTER ( CONTAINS ( LCASE ( ?x ) , 'ugc' ) ) }
SELECT DISTINCT ?sbj ?sbj_label { ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?sbj . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P31> . ?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q2488>. ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?sbj . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P59> . ?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q9256>. ?sbj rdfs:label ?sbj_label . FILTER(CONTAINS(lcase(?sbj_label), 'ugc')) . FILTER (lang(?sbj_label) = 'en') } LIMIT 25
SELECT DISTINCT ?sbj ?sbj_label WHERE { ?sbj wdt:P31 wd:Q2488 . ?sbj wdt:P59 wd:Q9256 . ?sbj rdfs:label ?sbj_label . FILTER(CONTAINS(lcase(?sbj_label), 'ugc')) . FILTER (lang(?sbj_label) = 'en') } LIMIT 25 
UGC 1813 UGC 1813 UGC 117 UGC 117 UGC 121 UGC 121