'Return a list of `(stream_id, user_id, destination)` which is the
combined list of changes to devices, and which destinations need to be
poked. `destination` may be None if no destinations need to be poked.'

def get_all_device_list_changes_for_remotes(self, from_key, to_key):

    sql = '\n                                                SELECT    stream_id,    user_id,    destination    FROM    device_lists_stream\n                                                LEFT    JOIN    device_lists_outbound_pokes    USING    (stream_id,    user_id,    device_id)\n                                                WHERE    ?    <    stream_id    AND    stream_id    <=    ?\n                                '
    return self._execute('get_all_device_list_changes_for_remotes', None, sql, from_key, to_key)
