Applies to: ✅Microsoft Fabric✅Azure Data Explorer✅Azure Monitor✅Microsoft Sentinel
クエリには、セミコロン (;) 文字で区切っている限り、複数の表形式の式ステートメントを含めることができます。 その後、クエリは複数の表形式の結果を返します。 結果は表形式の式ステートメントによって生成され、クエリ テキスト内のステートメントの順序に従って順序付けられます。
Note
- Prefer batching and
materializeover using the fork operator. - 2 つのステートメントはセミコロンで区切る必要があります。
Examples
The examples in this article use publicly available tables in the help cluster, such as the
StormEventstable in the Samples database.
The examples in this article use publicly available tables, such as the
Weathertable in the Weather analytics sample gallery. ワークスペース内のテーブルと一致するように、クエリ例のテーブル名を変更する必要がある場合があります。
次の例では、複数のテーブルを同時に作成する方法を示します。
表形式の結果に名前を付けます
次のクエリでは、2 つの表形式の結果が生成されます。 その後、ユーザー エージェント ツールは、それぞれに関連付けられた適切な名前 (Count of events in Florida と Count of events in Guam) でそれらの結果を表示できます。
クエリ を実行する
StormEvents | where State == "FLORIDA" | count | as ['Count of events in Florida'];
StormEvents | where State == "GUAM" | count | as ['Count of events in Guam']
Output
- フロリダ州のイベントの数
- グアム のイベントの数
| Count |
|---|
| 1042 |
計算を共有する
バッチ処理は、ダッシュボードなどの複数のサブクエリによって共通の計算が共有されるシナリオに役立ちます。 If the common calculation is complex, use the materialize() function and construct the query so that it will be executed only once.
クエリ を実行する
let m = materialize(StormEvents | summarize n=count() by State);
m | where n > 2000;
m | where n < 10
Output