def sql_statement(self, ev):
        """Completions for %sql commands"""
        chunks = ev.line.split()
        if len(chunks) == 2:
            first, second = chunks
            starters = 'select insert'.split()  # TODO: delete, update
            if starters in first and (second in self.db.tablenames() or
                                      self.is_valid_join_expression(second)):
                return self.expand_two_token_sql(ev)
        if '**' in ev.symbol:  # special join syntax t1**t2
            return self.join_shortcut(ev)
        if ev.symbol.count('.') == 1:  # something.other
            return self.dotted_expression(ev, expansion=True)
        # single token, no dot
        matches = match_lists([self.db.tablenames(), self.db.fieldnames(),
                               RESERVED_WORDS], ev.symbol)
        matches.sort()
        return matches
dataset/ETHPy150Open jaysw/ipydb/ipydb/completion.py/IpydbCompleter.sql_statement/swapped operands of `in`