code: def get_subdomain_history(self, fqn, start_sequence=None, end_sequence=None, start_zonefile_index=None, end_zonefile_index=None, include_unaccepted=False, offset=None, count=None, cur=None):
          
          sql = 'SELECT * FROM {} WHERE fully_qualified_subdomain = ? {} {} {} {} {} ORDER BY parent_zonefile_index ASC'.format(
                  self.subdomain_table,
                  'AND accepted=1' if not include_unaccepted else '',
                  'AND parent_zonefile_index >= ?' if start_zonefile_index is not None else '',
                  'AND parent_zonefile_index < ?' if end_zonefile_index is not None else '',
                  'AND sequence >= ?' if start_sequence is not None else '',
                  'AND sequence < ?' if end_sequence is not None else '')
  
          args = (fqn,)
          if start_zonefile_index is not None:
              args += (start_zonefile_index,)
  
          if end_zonefile_index is not None:
              args += (end_zonefile_index,)
  
          if start_sequence is not None:
              args += (start_sequence,)
  
          if end_sequence is not None:
              args += (end_sequence,)
          
          if count is not None:
              sql += ' LIMIT ?'
              args += (count,)
          
          if offset is not None:
              sql += ' OFFSET ?'
              args += (offset,)    
          
          sql += ';'
  
          if cur is None:
              cursor = self.conn.cursor()
          else:
              cursor = cur
  
          rowcursor = db_query_execute(cursor, sql, args)
  
          rows = []
          for rowdata in rowcursor:
              # want subdomain rec
              subrec = self._extract_subdomain(rowdata)
              rows.append(subrec)
          
          return rows
docs: Get the subdomain's history over a block range.
          By default, only include accepted history items (but set include_unaccepted=True to get them all)
          No zone files will be loaded.
  
          Returns the list of subdomains in order by sequnce number, and then by parent zonefile index