code: def get_filter_qobj(self, keys=None):
      
      # only care about columns in aggregates right?
      cols = set()
      for agg in self.select.aggregates:
          cols.update(agg.cols)
      sels = [SelectExpr(col, [col], col, None) for col in cols]
      select = Select(sels)
      where = list(self.where)
      if keys:
        keys = list(keys)
        keys = map(sqlize, list(keys))
        expr = self.select.nonaggs[0].expr
  
        clause = []
        if None in keys:
          clause.append("%s is null" % expr)
        if len([k for k in keys if k is not None]) > 0:
          clause.append("%s in %%s" % expr)
        clause = " or ".join(clause)
        where.append(clause)
      else:
        where.append( '%s = %%s' % (self.select.nonaggs[0].expr ) )
      q = Query(self.db, select, self.fr, where)
      return q
docs: Return a copy of this Query object with additional where clauses for the 
      keys in the argument