Back the Maximum Value of a and b in Medium.
Syntax
greatest(a, b)
Param
a,b– The two Values to compareReturn value
Example
SELECT greatest(1, 2)
┌─greatest(1, 2)─┐ │ 2 │ └────────────────┘
SELECT greatest(toDate('2019-01-01'), toDate('2019-01-02'))
┌─greatest(toDate('2019-01-01'), toDate('2019-01-02'))─┐ │ 2019-01-02 │ └──────────────────────────────────────────────────────┘
notEquals, a != b and a <> b Operator
Syntax
notEquals(a, b) a!=b a<>b
Param
a,b– The two Values to compareReturn value
Example
SELECT notEquals(1, 1), 1!=1, 1<>1
┌─notEquals(1, 1)─┬─notEquals(1, 1)─┬─notEquals(1, 1)─┐ │ 0 │ 0 │ 0 │ └─────────────────┴─────────────────┴─────────────────┘
SELECT notEquals(1, 2), 1!=2, 1<>2
┌─notEquals(1, 2)─┬─notEquals(1, 2)─┬─notEquals(1, 2)─┐ │ 1 │ 1 │ 1 │ └─────────────────┴─────────────────┴─────────────────┘