Functions can be used in queries, some general guidelines to be followed while using funtions in queries are

You can use functions to perform computations on the data.

Example:

SUM(SALES, DISCOUNT)

SHOW CALC(SUM(PRODUCT(SALES,DISCOUNT))/SUM(SALES))