def select_fields_as_sql ( self ) : return comma_join ( list ( self . _fields ) + [ '%s AS %s' % ( v , k ) for k , v in self . _calculated_fields . items ( ) ] )
how to put all sql columns in a list python
Returns the selected fields or expressions as a SQL string .
def select_fields_as_sql(self):
        """
        Returns the selected fields or expressions as a SQL string.
        """
        return comma_join(list(self._fields) + ['%s AS %s' % (v, k) for k, v in self._calculated_fields.items()])