By Allen G. Taylor

Part of SQL For Dummies Cheat Sheet

The SQL set functions give you a quick answer to questions you may have about the characteristics of your data as a whole. How many rows does a table have? What is the highest value in the table? What is the lowest? These are the kinds of questions that the SQL set functions can answer for you.

Function Effect
COUNT Returns the number of rows in the specified table
MAX Returns the maximum value that occurs in the specified able
MIN Returns the minimum value that occurs in the specified table
SUM Adds up the values in a specified column
AVG Returns the average of all the values in the specified column
LISTAGG Transforms values from a group of rows into a delimited string

Trigonometric and Logarithmic Functions

sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, log(<base>, <value>), log10(<value>). ln( <value>)

JSON Constructor Functions

JSON_OBJECT

JSON_ARRAY

JSON_OBJECTAGG

JSON_ARRAYAGG

JSON Query Functions

JSON_EXISTS

JSON_VALUE

JSON_QUERY

JSON_TABLE