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

# ClickHouse データの選択

> ClickHouse データの選択について学びます

<a href="/docs/get-started/quickstarts/home" onClick={(e) => { e.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">リアルタイムアナリティクス</Badge>
  <Badge size="lg" color="blue">データウェアハウジング</Badge>
  <Badge size="lg" color="blue">オブザーバビリティ</Badge>
  <Badge size="lg" color="blue">AI/ML</Badge>
  <Badge size="lg" color="orange">OSS</Badge>
</div>

ClickHouse は SQL データベースであり、使い慣れたものと同じ種類の `SELECT` クエリを記述してデータを照会できます。たとえば、次のようになります。

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

<Note>
  構文や利用可能な句、オプションの詳細については、[SQL リファレンス](/docs/ja/reference/statements/select/index)を参照してください。
</Note>

レスポンスは見やすいテーブル形式で返されます。

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

[ClickHouseでサポートされている多数の出力フォーマット](/docs/ja/reference/formats/index#formats-overview)のいずれかを指定するには、`FORMAT` 句を追加します。

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

上記のクエリでは、出力はタブ区切りで返されます。

```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 は 70 種類を超える入出力フォーマットをサポートしているため、数千もの関数とさまざまなデータフォーマットを活用して、高度かつ高速な ETL のようなデータ変換を実行できます。実際、データ変換のために
  ClickHouse server を稼働させておく必要すらなく、`clickhouse-local` ツールを使用できます。詳しくは、[`clickhouse-local` のドキュメントページ](/docs/ja/concepts/features/interfaces/cli)をご覧ください。
</Note>

<div className="mt-8">
  <a href="/docs/get-started/quickstarts/home" onClick={(e) => { e.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>
