---
schema_version: "1"
id: 6275e022549dff1d6884924b5ea2bbf585c484cc22dc809d3105ded34002140b
title: sign({n})
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_sql/guides/bi-sql-math-sign.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-sql/guide/bi-sql-math-sign.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: dbe02fd22d3ab657491cd4360040ca6907e4b7c30fad569baa8ac3e8c23ac3a5
products:
  - SQL for Analytics Developer Guide
  - analytics
---

# sign({n})

Returns 1 if the numeric value, `{n}` is positive. It returns -1 if the `{n}` is negative, and 0 if `{n}` is 0. `{n}` can be any real number in the range of -1e308 \<= `{n}` \<= 1e308.

`SIGN(`{n}`)` takes the following syntax.

```nolang
SELECT SIGN(N) as ALIAS
FROM DATASET;
```

## Example

This example returns the `sign` of -12.

```nolang
SELECT SIGN(-12) as signValue
FROM "Opportunity"
LIMIT 1;
```

| signValue |
| --------- |
| -1        |
