# SELECT

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: SELECT
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/sql-statements/select
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-statements/select.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-statements/select.adoc
description: The SELECT statement retrieves data from one or more tables.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-statements/select.md -->

The `SELECT` statement retrieves data from one or more tables. Use `SELECT` to:

-   Retrieve specific columns from a table.

-   Query data across multiple tables.

-   Filter results based on specific criteria.


## [](#syntax)Syntax

To retrieve data from a table, use this syntax:

```sql
SELECT * FROM default_redpanda_catalog=>table_name;
```

To filter by specific columns, use:

```sql
SELECT column1, column2, ...
FROM default_redpanda_catalog=>table_name;
```

Where:

-   `SELECT`: Specifies the data to retrieve.

-   `*`: Returns all columns.

-   `FROM`: Specifies the table to query.

-   `table_name`: The name of the table.

-   `column1, column2, …​`: The columns to retrieve.


> 📝 **NOTE**
>
> The `SELECT` statement is case-insensitive. `select` and `SELECT` produce the same result.

## [](#examples)Examples

The following examples query a table named `student_data` that contains student records with `id`, `name`, and `domicile` columns.

### [](#query-data-from-all-columns)Query data from all columns

1.  To display all the data from the `student_data` table, use this syntax:

    ```sql
    SELECT * FROM default_redpanda_catalog=>table_name;
    ```

2.  Run the following query:

    ```sql
    SELECT * FROM default_redpanda_catalog=>student_data;
    ```

3.  The query returns:

    ```sql
    +--------+----------+----------------+
    | id     | name     | domicile       |
    +--------+----------+----------------+
    | 119291 | Jordan   | Los Angeles    |
    | 119292 | Mike     | Melbourne      |
    | 119293 | Will     | Sydney         |
    +--------+----------+----------------+
    ```


### [](#query-data-from-specific-columns)Query data from specific columns

1.  To get the list of students' names with their IDs, use this syntax:

    ```sql
    SELECT column_1, column_2 FROM default_redpanda_catalog=>table_name;
    ```

2.  Run:

    ```sql
    SELECT id, name FROM default_redpanda_catalog=>student_data;
    ```

3.  The query returns:

    ```sql
    +--------+----------+
    | id     | name     |
    +--------+----------+
    | 119291 | Jordan   |
    | 119292 | Mike     |
    | 119293 | Will     |
    +--------+----------+
    ```


### [](#query-data-from-a-specific-column-with-the-condition)Query data from a specific column with the condition

1.  With a large amount of data, skimming for the desired data can take a long time. Apply conditions to the `SELECT` statement to narrow the results:

    ```sql
    SELECT column_1 FROM default_redpanda_catalog=>table_name WHERE condition;
    ```

2.  To find the student who lives in Sydney, run:

    ```sql
    SELECT name FROM default_redpanda_catalog=>student_data WHERE domicile='Sydney';
    ```

3.  The query returns:

    ```sql
    +----------+
    | name     |
    +----------+
    | Will     |
    +----------+
    ```


## [](#select-distinct)SELECT DISTINCT

To return only unique rows from the result set, add the `DISTINCT` keyword after `SELECT`:

```sql
SELECT DISTINCT column1, column2, ...
FROM default_redpanda_catalog=>table_name;
```

`DISTINCT` deduplicates rows based on the combined values of all listed columns.

> 📝 **NOTE**
>
> Redpanda SQL does not support `SELECT DISTINCT ON (column_list) …​`, the PostgreSQL-specific form that keeps the first row for each combination of `ON` columns.