Skip to content

Commit a13f688

Browse files
committed
Copy edit
1 parent 5253ddc commit a13f688

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

articles/cosmos-db/nosql/tutorial-query.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,44 @@
11
---
2-
title: 'Tutorial: How to query with SQL in Azure Cosmos DB?'
3-
description: In this tutorial, learn how to query with SQL queries in Azure Cosmos DB using the query playground.
2+
title: |
3+
Tutorial: Query data
4+
titleSuffix: Azure Cosmos DB for NoSQL
5+
description: In this tutorial, learn how to query data in Azure Cosmos DB for NoSQL with the built-in query syntax using the Data Explorer.
46
author: seesharprun
57
ms.author: sidandrews
68
ms.reviewer: mjbrown
79
ms.service: cosmos-db
810
ms.subservice: nosql
911
ms.custom: tutorial-develop, mvc, ignite-2022
1012
ms.topic: tutorial
11-
ms.date: 03/07/2023
13+
ms.date: 03/16/2023
1214
---
1315

14-
# Tutorial: Query Azure Cosmos DB by using the API for NoSQL
16+
# Tutorial: Query data in Azure Cosmos DB for NoSQL
17+
1518
[!INCLUDE[NoSQL](../includes/appliesto-nosql.md)]
1619

17-
The Azure Cosmos DB [API for NoSQL](../introduction.md) supports querying documents using SQL. This article provides a sample document and two sample SQL queries and results.
20+
[Azure Cosmos DB for NoSQL](../introduction.md) supports querying documents using the built-in query syntax. This article provides a sample document and two sample queries and results.
1821

1922
This article covers the following tasks:
2023

2124
> [!div class="checklist"]
22-
> - Query data with SQL
25+
>
26+
> - Query NoSQL data with the built-in query syntax
27+
>
2328
2429
## Prerequisites
2530

26-
This tutorial assumes you have an Azure Cosmos DB account and collection. Don't have any of those resources? Complete this quickstart: [Create an Azure Cosmos DB account, database, container, and items from the Azure portal](quickstart-portal.md).
31+
This tutorial assumes you have an Azure Cosmos DB account, database, and container.
32+
33+
Don't have any of those resources? Complete this quickstart: [Create an Azure Cosmos DB account, database, container, and items from the Azure portal](quickstart-portal.md).
34+
35+
You can run the queries using the [Azure Cosmos DB Explorer](../data-explorer.md) in the Azure portal. You can also run queries by using the [REST API](/rest/api/cosmos-db/) or [various SDKs](sdk-dotnet-v3.md).
36+
37+
For more information about queries, see [setting started with queries](query/getting-started.md).
2738

2839
## Sample document
2940

30-
The SQL queries in this article use the following sample document.
41+
The queries in this article use the following sample document.
3142

3243
```json
3344
{
@@ -58,15 +69,9 @@ The SQL queries in this article use the following sample document.
5869
}
5970
```
6071

61-
## Where can I run SQL queries?
62-
63-
You can run queries using the Data Explorer in the Azure portal and by using the [REST API and SDKs](sdk-dotnet-v2.md).
64-
65-
For more information about SQL queries, see [Getting started with queries](query/getting-started.md).
66-
67-
## Example query 1
72+
## Select all fields and apply a filter
6873

69-
Given the sample family document, following SQL query returns the documents where the ID field matches `WakefieldFamily`. Since it's a `SELECT *` statement, the output of the query is the complete JSON document:
74+
Given the sample family document, the following query returns the documents where the ID field matches `WakefieldFamily`. Since it's a `SELECT *` statement, the output of the query is the complete JSON document:
7075

7176
Query:
7277

@@ -107,7 +112,7 @@ Results:
107112
}
108113
```
109114

110-
## Example query 2
115+
## Select a cross-product of a child collection field
111116

112117
The next query returns all the given names of children in the family whose ID matches `WakefieldFamily`.
113118

@@ -138,7 +143,9 @@ Results:
138143
In this tutorial, you've done the following tasks:
139144

140145
> [!div class="checklist"]
141-
> - Learned how to query using SQL
146+
>
147+
> - Learned how to query using the built-in query syntax
148+
>
142149
143150
You can now proceed to the next tutorial to learn how to distribute your data globally.
144151

0 commit comments

Comments
 (0)