Building the sql expression

        :param db: the database instance

def compile(self, db):
        """Building the sql expression

        :param db: the database instance
        """
        sql = self.expression
        if self.alias:
            sql += (' AS ' + db.quote_column(self.alias))
        return sql