> ## 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.

> Reference material for ST_X function

# ST_X

Extracts the longitude coordinate of a `GEOGRAPHY` Point. Returns `NULL` for empty geography objects. Returns an error if the input is not a single Point (and not an empty `GEOGRAPHY` object).

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
ST_X(<object>)
```

## Parameters

| Parameter  | Description                                        | Supported input types |
| :--------- | :------------------------------------------------- | :-------------------- |
| `<object>` | The `GEOGRAPHY` Point to extract the longitude of. | `GEOGRAPHY`           |

## Return Type

`ST_X` returns a value of type `DOUBLE PRECISION`.

## Example

The following code example constructs a Point in the `GEOGRAPHY` data type from longitude and latitude coordinates and extracts its longitude coordinate:

<div className="query-window">
  ```
  SELECT ST_X(ST_GEOGPOINT(-73.98551041593687, 40.75793403395676)) AS result;
  ```

  | result <span>double null</span> |
  | :------------------------------ |
  | -73.98551041593687              |

  <p><span>Rows: 1</span><span>Execution time: 5.46ms</span></p>
</div>
