query: #adapted from query by User:Matěj Suchánek
  SELECT ?item ?count ?rnd ?st ?sl ?ids
  WITH
  { 
    SELECT DISTINCT ?item WHERE { ?item wdt:P31 wd:Q11424 . [] schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/> . ?item wikibase:statements ?st . FILTER(?st < 6) }
  } AS %all 
  WITH 
  {
    SELECT (COUNT(*) AS ?count) { INCLUDE %all }
  } AS %count 
  WITH
  {
    SELECT (?item AS ?item2) WHERE { INCLUDE %all }
  } AS %all2 
  WITH
  {
    SELECT ?item (SUM(?x) AS ?i) WHERE {
      INCLUDE %all .
      INCLUDE %all2 .
      BIND( IF( STR( ?item ) > STR( ?item2 ), 1, 0 ) AS ?x ) .
    } GROUP BY ?item
  } AS %main 
  WHERE
  {
    hint:Query hint:optimizer "None".    
    INCLUDE %main .
    INCLUDE %count .
    BIND( FLOOR( RAND() * ?count ) AS ?rnd ) .
    FILTER( ?rnd > ?i && ?rnd < ?i+21 ) .
    ?item wikibase:statements ?st; wikibase:sitelinks ?sl ; wikibase:identifiers ?ids .
  }