<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_to_table(self, field, alias, add_group=False):
 """ Adds this field to the field's table and optionally group by it :param field: The field to add to the table :type field: str or :class:`Field <querybuilder.fields.Field>` :param alias: The alias for the field :type alias: str :param add_group: Whether or not the table should group by this field :type: bool """

        self.table.add_field({
            alias: field
        })
        if add_group:
            self.table.owner.group_by(alias)