query: SELECT ?continent ?continentLabel
  WHERE
  {
    ?continent wdt:P31 wd:Q5107.
    SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  }
  ORDER BY xsd:integer(SUBSTR(STR(?continent),STRLEN("http://www.wikidata.org/entity/Q")+1))