> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemreference/sql-compatibility/functions.md).

# Functions

The functions are sorted on their function group, and on alphabetical order. The SQL compatibility is given by either "Yes" or "No".

### [Aggregation](/platform/wemreference/functions/aggregation.md)

| Function                                | SQL compatible                            |
| --------------------------------------- | ----------------------------------------- |
| Average                                 | No                                        |
| <mark style="color:green;">Count</mark> | <mark style="color:green;">**Yes**</mark> |
| First                                   | No                                        |
| Last                                    | No                                        |
| <mark style="color:green;">Max</mark>   | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">Min</mark>   | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">Sum</mark>   | <mark style="color:green;">**Yes**</mark> |

### [Concepts](/platform/wemreference/functions/concepts.md)&#x20;

| Function       | SQL compatible |
| -------------- | -------------- |
| ConceptID      | No             |
| Description    | No             |
| FindConcepts   | No             |
| GetAncestors   | No             |
| GetChildren    | No             |
| GetDescendants | No             |
| GetParent      | No             |
| Intersection   | No             |
| LocalName      | No             |
| Synonyms       | No             |
| ToConcept      | No             |
| Union          | No             |

### [Date](/platform/wemreference/functions/date.md)

| Function                                   | SQL compatible                            |
| ------------------------------------------ | ----------------------------------------- |
| Date                                       | No                                        |
| DateDiff                                   | No                                        |
| DateOnly                                   | No                                        |
| DatePart                                   | No                                        |
| DateOfWeek                                 | No                                        |
| FromUnixTimestamp                          | No                                        |
| MoveDate                                   | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">Now</mark>      | <mark style="color:green;">**Yes**</mark> |
| TimeOfDay                                  | No                                        |
| <mark style="color:green;">Today</mark>    | <mark style="color:green;">**Yes**</mark> |
| ToDuration                                 | No                                        |
| ToLocal                                    | No                                        |
| ToUnixTimestamp                            | No                                        |
| ToUTC                                      | No                                        |
| <mark style="color:green;">UTCNow</mark>   | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">UTCToday</mark> | <mark style="color:green;">**Yes**</mark> |

### [Environment](/platform/wemreference/functions/environment.md)

| Function                                         | SQL compatible                            |
| ------------------------------------------------ | ----------------------------------------- |
| <mark style="color:green;">CountryCode</mark>    | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">CountryName</mark>    | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">Hostname</mark>       | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">IPAddress</mark>      | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">IsFirstRequest</mark> | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">IsHttps</mark>        | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">IsPreview</mark>      | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">IsStaging</mark>      | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">IsLive</mark>         | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">NodeTrail</mark>      | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">PortalID</mark>       | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">ProjectID</mark>      | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">ProjectName</mark>    | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">Setting</mark>        | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">URLPath</mark>        | <mark style="color:green;">**Yes**</mark> |

### [Files](/platform/wemreference/functions/files.md)

| Function | SQL compatible |
| -------- | -------------- |
| FileName | No             |
| FileSize | No             |
| FileUrl  | No             |
| MimeType | No             |

### [Lists](/platform/wemreference/functions/lists.md)

| Function                                 | SQL compatible                            |
| ---------------------------------------- | ----------------------------------------- |
| Distinct                                 | No                                        |
| IsNewRow                                 | No                                        |
| IsOnRow                                  | No                                        |
| List                                     | No                                        |
| <mark style="color:green;">NameOf</mark> | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">RowID</mark>  | <mark style="color:green;">**Yes**</mark> |

### [Math](/platform/wemreference/functions/math.md)

| Function                             | SQL compatible                            |
| ------------------------------------ | ----------------------------------------- |
| Abs                                  | No                                        |
| Ceiling                              | No                                        |
| Cos                                  | No                                        |
| Distance                             | No                                        |
| Exp                                  | No                                        |
| Floor                                | No                                        |
| Log                                  | No                                        |
| Log10                                | No                                        |
| <mark style="color:green;">Pi</mark> | <mark style="color:green;">**Yes**</mark> |
| Pow                                  | No                                        |
| Random                               | No                                        |
| Round                                | No                                        |
| Sin                                  | No                                        |
| Sqrt                                 | No                                        |
| ToNumber                             | No                                        |

### [Security](/platform/wemreference/functions/security.md)

| Function               | SQL compatible |
| ---------------------- | -------------- |
| AesDecrypt             | No             |
| AesEncrypt             | No             |
| Aeslv                  | No             |
| AesKey                 | No             |
| CreateJsonWebTokenH256 | No             |
| HmacSha256             | No             |
| Md5                    | No             |
| Password               | No             |
| PasswordStrength       | No             |
| Pdkdf2                 | No             |
| Sha1                   | No             |
| Sha256                 | No             |
| Totp                   | No             |

### [Text](/platform/wemreference/functions/text.md)

| Function            | SQL compatible |
| ------------------- | -------------- |
| AsText              | No             |
| Base32ToText        | No             |
| Base64ToText        | No             |
| CompareFuzzy        | No             |
| Concat              | No             |
| Contains            | No             |
| FormatDate          | No             |
| FormatDuration      | No             |
| FormatNumber        | No             |
| Guid                | No             |
| HexToText           | No             |
| HtmlAttributeEncode | No             |
| HtmlEncode          | No             |
| IndexOf             | No             |
| JavascriptEncode    | No             |
| JsonEncode          | No             |
| Length              | No             |
| Padl                | No             |
| Padr                | No             |
| RegExIsMatch        | No             |
| RegExMatches        | No             |
| RegExReplace        | No             |
| Replace             | No             |
| Split               | No             |
| StringPart          | No             |
| SubString           | No             |
| ToBase32            | No             |
| ToBase64            | No             |
| ToBase64Url         | No             |
| ToHex               | No             |
| ToLower             | No             |
| ToRichText          | No             |
| ToString            | No             |
| ToTitleCase         | No             |
| ToUpper             | No             |
| Trim                | No             |
| UrlDecode           | No             |
| UrlEncode           | No             |
| XmlAttributeEncode  | No             |
| XmlEncode           | No             |
| XPath               | No             |
| XPathList           | No             |
| XPathNumber         | No             |

### [Validation](/platform/wemreference/functions/validation.md)

| Function                                    | SQL compatible                            |
| ------------------------------------------- | ----------------------------------------- |
| <mark style="color:green;">HasValue</mark>  | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">IsEmpty</mark>   | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">IsKnown</mark>   | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">IsUnknown</mark> | <mark style="color:green;">**Yes**</mark> |
| IsValidBankaccount                          | No                                        |
| IsValidBSN                                  | No                                        |
| IsValidBTW                                  | No                                        |
| IsValidEmailAddress                         | No                                        |
| IsValidIBAN                                 | No                                        |
| IsValidPhonenumber                          | No                                        |
| IsValidURL                                  | No                                        |

### [Localization](/platform/wemreference/functions/localization.md)

| Function                                             | SQL compatible                            |
| ---------------------------------------------------- | ----------------------------------------- |
| <mark style="color:green;">AvailableLanguages</mark> | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">CurrentLanguages</mark>   | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">CurrentTimezone</mark>    | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">LanguageStrategy</mark>   | <mark style="color:green;">**Yes**</mark> |
| <mark style="color:green;">Languages in WEM</mark>   | <mark style="color:green;">**Yes**</mark> |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wem.io/platform/wemreference/sql-compatibility/functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
