query: SELECT ?item ?qid (GROUP_CONCAT( DISTINCT ?sitelink) as ?links)
  (SAMPLE(?ids) as ?ids) (SAMPLE(?sl) as ?sl) (SAMPLE(?st) as ?st)
  WITH
  {
      SELECT DISTINCT ?item ?qid
      {
          { ?item wdt:P31 wd:Q11424 } 
          UNION
          { ?item wdt:P31 wd:Q24862 } 
          UNION
          { ?item wdt:P31 wd:Q506240 } 
          UNION
          { ?item wdt:P31 wd:Q336144 }
         BIND (xsd:integer(STRAFTER(str(?item), "Q")) AS ?qid) 
         FILTER (?qid > 65200900) .       
      }
      ORDER BY DESC(?qid) 
      LIMIT 500  
  } as %films    
  WHERE
  { 
    INCLUDE %films
    OPTIONAL { [] schema:about ?item ; schema:inLanguage ?l ; schema:name ?w2  BIND( CONCAT("[[:",?l,":",str(?w2),"|",?l,"]]") as ?sitelink) }   
    ?item wikibase:statements ?st; wikibase:sitelinks ?sl ; wikibase:identifiers ?ids 
  }
  GROUP BY ?item ?qid 
  ORDER BY DESC(?qid) 
  LIMIT 500