Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198.
Existing Python UDFs will continue to function until June 30, 2026. For more information, see the
blog post
DEGREES function
Converts an angle in radians to its equivalent in degrees.
Syntax
DEGREES(number)
Argument
- number
-
The input parameter is a
DOUBLE PRECISIONnumber.
Return type
DOUBLE PRECISION
Examples
To return the degree equivalent of .5 radians, use the following example.
SELECT DEGREES(.5);+-------------------+ | degrees | +-------------------+ | 28.64788975654116 | +-------------------+
To convert PI radians to degrees, use the following example.
SELECT DEGREES(pi());+---------+ | degrees | +---------+ | 180 | +---------+