SQUARE
Returns the square of the specified float value.
Syntax​
SQUARE ( float_expression )
Arguments​
float_expression
Is an expression of type float or of a type that can be implicitly converted to float.
Return Type​
Returns values of type FLOAT64.
Examples​
Examples in this section use the example blockchain.
This example shows the results of using the SQUARE
function.
SELECT SQUARE(real), SQUARE(integer) FROM example;
Response:
SQUARE(real) [FLOAT64] SQUARE(integer) [FLOAT64]
NULL 1
0 0
1 1
4 4