Hello!

I need to get some cities with it's names. And here is my query:

               SELECT DISTINCT ?cityUri ?cityName
               WHERE
               {
                ?cityUri ?predicate ?value.
                ?cityUri a <http://linkedgeodata.org/vocabulary#city>.
                ?value bif:contains "someCity".
                OPTIONAL
                {
                 ?cityUri <http://linkedgeodata.org/vocabulary#name>
?cityName
                }
               }

But when there are several names for one city I get duplicated cities. Of
course I can remove duplicates after retrieving the result, but it's ugly.
Is there any way to limit optional parameters (for example, as adding Limit
to query)?

Regards,
Alexander

Reply via email to