Following the discussion at https://www.mediawiki.org/wiki/Topic:Tyz12m2b02qjhbuh, it may be needed to see in which order the results are returned from MWAPI - this may be relevant for search results, etc. Since the following joins may not preserve order, it may be useful to capture the order into a variable, such as:
?ordinal wikibase:apiOrdinal true .