# Greater-than >

{% hint style="info" %}
The Greater Than operator **`>`** is used to compare two values and to check whether a value is greater than the other.\
The `>` operator can be used to compare values of the following types:

* text
* number
* duration
* datetime
* concept
* reference

This function is SQL compatible. For more information about SQL compatibility, see our [documentation](https://docs.wem.io/platform/wemreference/sql-compatibility).&#x20;
{% endhint %}

{% hint style="success" %}
The result of the `>` operator is true or false.\
The result is <mark style="color:green;">True</mark> when`Value1` is greater than `Value2`.\
The result is <mark style="color:red;">False</mark> when `Value1` is **not** greater than `Value2`.

* number > number&#x20;
* text > text returns (alphabetical comparison, case insensitive)
* datetime > datetime&#x20;
* duration > duration&#x20;
* concept > concept (applies to the order of concepts)
* reference > reference&#x20;

If any of the operands is unknown, the result is also unknown.\
If operands are not of the same type, the "*<mark style="color:red;">expression type mismatch</mark>*" warning is displayed.
{% endhint %}

<details>

<summary><mark style="color:blue;"><code>value1</code></mark><code> > </code><mark style="color:blue;"><code>value2</code></mark> </summary>

`35 > 35` \
\&#xNAN;*=> No*

`1234 > 2345`\
\&#xNAN;*=> No*

`"text2" > "text1"`\
\&#xNAN;*=> Yes*

`(Today() + '1d') > UTCNow()`\
\&#xNAN;*=> Yes*

`'12d' > '20m'`\
\&#xNAN;*=> Yes*

`'Product categories'.'Monitor' > 'Product categories'.'Phone'`\
\&#xNAN;*=> No (in the order of concepts, Monitor comes first)*

`[Data.CurrentUser] > [OtherUser]`\
\&#xNAN;*=> Yes (if current-user-id > other-user-id)*

</details>
