One tool which can be used in queries is the formula function.
This can be accessed through the formula icon in the top right-hand side of the page.
Depending on what formula you want to perform on your query, label your new column accordingly.
Below the input box there is a list of available actions which can be performed.
Type the desired expression into the box and click 'Create Formula' to produce the formula column within your query. In this example, the formula will create a new column to display the length of given domain names.
After applying your formula, your new column should appear in your set of data.
For further help on formulas, please see Expression Guide HERE.