> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.firebolt.io/feedback

```json
{
  "path": "/reference-sql/functions-reference/numeric/abs",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

> Reference material for ABS function

# ABS

export const QueryWindow = ({content}) => {
  const {sql, result} = content;
  const [inited, setInited] = useState(false);
  const buttonRef = useRef(null);
  useEffect(() => {
    if (!inited && buttonRef.current) {
      runQuery(buttonRef.current, true);
      setInited(true);
    }
  }, []);
  return <div className="query-window">
      <div className="query-toolbar">
        <button className="run-button" onClick={ev => runQuery(ev.target)} ref={buttonRef}>Run Query</button>
        <span className="window-title">Interactive SQL Playground 🔥</span>
      </div>
      <div className="query-content">
        <pre><code className="firebolt-sql language-sql" contentEditable="true" spellCheck="false" data-original-query={sql}>{sql}</code></pre>
        <script type="application/json" className="fallback-result" style={{
    display: "none"
  }}>{JSON.stringify(result)}</script>
        <div className="server-unavailable-banner query-window-hidden">
          The Firebolt playground server is currently unavailable. Using precomputed query results.
        </div>
        <div className="query-results"></div>
      </div>
    </div>;
};

Calculates the absolute value of a number `<value>`, displaying the number's distance from `0`.

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
ABS(<value>)
```

## Parameters

| Parameter        | Description                                                | Supported input types |
| :--------------- | :--------------------------------------------------------- | :-------------------- |
| `<numeric_type>` | The number that the absolute value function is applied to. | Any `NUMERIC` type    |

## Return Type

`NUMERIC`

## Example

The following example returns the absolute value of `-200.5`:

<QueryWindow
  content={{
"sql": "SELECT ABS(-200.50) as result;",
"result": {
"data": [
  [
    200.5
  ]
],
"meta": [
  {
    "name": "result",
    "type": "double"
  }
],
"query": {
  "query_id": "7eab6ce7-0174-4e01-adee-2765f715d70a",
  "query_label": null,
  "request_id": "02476fa1-b9ae-4ece-9606-84cee56a595b"
},
"rows": 1,
"statistics": {
  "bytes_read": 1,
  "elapsed": 0.009298,
  "rows_read": 1,
  "scanned_bytes_cache": 0,
  "scanned_bytes_storage": 0,
  "time_before_execution": 0.00025336,
  "time_to_execute": 9.5656e-05
}
}
}}
/>
