def _get_data(self):
        if self.keys is not None and not self.group_by:
            raise SqlReportException('Keys supplied without group_by.')

        qc = self.query_context()
        for c in self.columns:
            qc.append_column(c.view)

        session = connection_manager.get_scoped_session(self.engine_id)

        try:
            for qm in qc.query_meta.values():
                date_aggregation_column = None
                if len(qm.columns) == 1:
                    c = self._find_column(qm.columns[0].column_name)
                    if hasattr(c, 'date_aggregation_column'):
                        date_aggregation_column = c.date_aggregation_column
                columns_names = itertools.chain.from_iterable([(col.column_name, col.alias) for col in qm.columns])
                for group_by in self.group_by:
                    if columns_names not in group_by:
                        column = self._find_column_view(group_by)
                        if column:
                            if date_aggregation_column:
                                column.key = date_aggregation_column
                                column.sql_column.column_name = date_aggregation_column
                            qm.append_column(column)

            return qc.resolve(session.connection(), self.filter_values)
        except:
            session.rollback()
            raise
dataset/ETHPy150Open dimagi/commcare-hq/custom/apps/cvsu/mixins.py/CVSUSqlDataMixin._get_data/swapped operands of `not in`