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

# Seleccionar datos de ClickHouse

> Aprende a seleccionar datos de ClickHouse

export const e_1 = undefined

export const e_0 = undefined

<a href="/docs/get-started/quickstarts/home" onClick={(e_0) => { e_0.preventDefault(); window.location.href = (window.location.pathname.startsWith('/docs') ? '/docs' : '') + '/get-started/quickstarts/home'; }} className="inline-flex items-center gap-1.5 text-sm text-gray-500 dark:text-zinc-500 hover:text-gray-900 dark:hover:text-[#fdff75] transition-colors font-normal no-underline"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="shrink-0"><path d="M19 12H5" /><path d="M12 19l-7-7 7-7" /></svg>All quickstarts</a>

<div className="mt-2 flex flex-wrap gap-2">
  <Badge size="lg" color="blue">Analítica en tiempo real</Badge>
  <Badge size="lg" color="blue">Data warehousing</Badge>
  <Badge size="lg" color="blue">Observabilidad</Badge>
  <Badge size="lg" color="blue">AI/ML</Badge>
  <Badge size="lg" color="orange">OSS</Badge>
</div>

ClickHouse es una base de datos SQL, y puedes consultar tus datos escribiendo el mismo tipo de consultas `SELECT` con el que ya estás familiarizado. Por ejemplo:

```sql theme={null}
SELECT *
FROM helloworld.my_first_table
ORDER BY timestamp
```

<Note>
  Consulta la [Referencia SQL](/docs/es/reference/statements/select/index) para obtener más información sobre la sintaxis, las cláusulas disponibles y otras opciones.
</Note>

Observa que la respuesta aparece en un práctico formato de tabla:

```response theme={null}
┌─user_id─┬─message────────────────────────────────────────────┬───────────timestamp─┬──metric─┐
│     102 │ Insert a lot of rows per batch                     │ 2022-03-21 00:00:00 │ 1.41421 │
│     102 │ Sort your data based on your commonly-used queries │ 2022-03-22 00:00:00 │   2.718 │
│     101 │ Hello, ClickHouse!                                 │ 2022-03-22 14:04:09 │      -1 │
│     101 │ Granules are the smallest chunks of data read      │ 2022-03-22 14:04:14 │ 3.14159 │
└─────────┴────────────────────────────────────────────────────┴─────────────────────┴─────────┘

4 rows in set. Elapsed: 0.008 sec.
```

Añada una cláusula `FORMAT` para especificar uno de los [numerosos formatos de salida que admite ClickHouse](/docs/es/reference/formats/index#formats-overview):

```sql theme={null}
SELECT *
FROM helloworld.my_first_table
ORDER BY timestamp
FORMAT TabSeparated
```

En la consulta anterior, la salida se muestra separada por tabulaciones:

```response theme={null}
Query id: 3604df1c-acfd-4117-9c56-f86c69721121

102 Insert a lot of rows per batch      2022-03-21 00:00:00     1.41421
102 Sort your data based on your commonly-used queries  2022-03-22 00:00:00     2.718
101 Hello, ClickHouse!  2022-03-22 14:04:09     -1
101 Granules are the smallest chunks of data read       2022-03-22 14:04:14     3.14159

4 rows in set. Elapsed: 0.005 sec.
```

<Note>
  ClickHouse admite más de 70 formatos de entrada y salida, así que, entre los miles de funciones y todos los formatos de datos, puede usar ClickHouse para realizar transformaciones de datos rápidas e impresionantes, similares a las de un proceso ETL. De hecho, ni siquiera
  necesita tener un servidor ClickHouse en ejecución para transformar datos: puede usar la herramienta `clickhouse-local`. Consulte la [página de documentación de `clickhouse-local`](/docs/es/concepts/features/tools-and-utilities/clickhouse-local) para más detalles.
</Note>

<div className="mt-8">
  <a href="/docs/get-started/quickstarts/home" onClick={(e_1) => { e_1.preventDefault(); window.location.href = (window.location.pathname.startsWith('/docs') ? '/docs' : '') + '/get-started/quickstarts/home'; }} className="inline-flex items-center gap-1.5 text-sm text-gray-500 dark:text-zinc-500 hover:text-gray-900 dark:hover:text-[#fdff75] transition-colors font-normal no-underline"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="shrink-0"><path d="M19 12H5" /><path d="M12 19l-7-7 7-7" /></svg>All quickstarts</a>
</div>
