- Administrative sub-divisions of a given entity query: modify this query to get a list of SUB-divisions of a given entity. E.g. states of USA, or provinces of Argentina. Each item must be unique, with name, flag, capital name, location, and image (all are optional{. Prevent query from returning the item itself, only subitems.
- For a given country, get a list of all bordering countries, as well as the requested country itself. Each must be unique. Optional capital with location and image, plus country flag.
- Given a city, get the historical population, and ensure each item is unique for that time. If more than one item is present for the same year, average them unless one is prefered. If possible, get the source of the data
Description
Description
Event Timeline
Comment Actions
For the first query: https://www.mediawiki.org/wiki/User:Smalyshev_(WMF)/Countries_and_States
The problem is ?types need to be configured manually and may be different for different countries. Let's see if that works.
Comment Actions
The third one:
SELECT (AVG(?population) as ?population) ?year WHERE { BIND(wd:Q64 as ?city) ?city p:P1082 [ ps:P1082 ?population; pq:P585 ?date ] BIND(year(?date) as ?year) } GROUP BY ?year ORDER BY ?year
Comment Actions
@Smalyshev the first query still gets the country itself - any good way to prevent that? Thanks!!!
Comment Actions
@Smalyshev sure, but I thought this might indicate that we might need to restructure the query a bit? But sure, I can totally do that.