NEG

This page describes the NEG function in Lenses SQL.

NEG(numExpr)

Returns the negative value of an expression it has to evaluate to a number type.

Available in:

Sample code:

USE `kafka`;
SELECT 
    NEG(float),
    float 
FROM numbers-data
LIMIT 1;

Output:

{
  "value": {
    "NEG": -95.95,
    "float": 95.95
  }
}

Last updated

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.