Skip to content

Commit 8aba350

Browse files
author
Dave Cuthbert
authored
DOCSP-25167 typo on views page (#1861)
1 parent 5b587ab commit 8aba350

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

source/core/views/join-collections-with-view.txt

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ Create two sample collections, ``inventory`` and ``orders``:
3131
] )
3232

3333
db.orders.insertMany( [
34-
{ orderID: 201, custid: 301, prodId: 100, numPurchased: 20 },
35-
{ orderID: 202, custid: 302, prodId: 101, numPurchased: 10 },
36-
{ orderID: 203, custid: 303, prodId: 102, numPurchased: 5 },
37-
{ orderID: 204, custid: 303, prodId: 103, numPurchased: 15 },
38-
{ orderID: 205, custid: 303, prodId: 103, numPurchased: 20 },
39-
{ orderID: 206, custid: 302, prodId: 102, numPurchased: 1 },
40-
{ orderID: 207, custid: 302, prodId: 101, numPurchased: 5 },
41-
{ orderID: 208, custid: 301, prodId: 100, numPurchased: 10 },
42-
{ orderID: 209, custid: 303, prodId: 103, numPurchased: 30 }
34+
{ orderId: 201, custid: 301, prodId: 100, numPurchased: 20 },
35+
{ orderId: 202, custid: 302, prodId: 101, numPurchased: 10 },
36+
{ orderId: 203, custid: 303, prodId: 102, numPurchased: 5 },
37+
{ orderId: 204, custid: 303, prodId: 103, numPurchased: 15 },
38+
{ orderId: 205, custid: 303, prodId: 103, numPurchased: 20 },
39+
{ orderId: 206, custid: 302, prodId: 102, numPurchased: 1 },
40+
{ orderId: 207, custid: 302, prodId: 101, numPurchased: 5 },
41+
{ orderId: 208, custid: 301, prodId: 100, numPurchased: 10 },
42+
{ orderId: 209, custid: 303, prodId: 103, numPurchased: 30 }
4343
] )
4444

4545
Create a Joined View
@@ -90,15 +90,15 @@ The documents in the ``sales`` view are:
9090
.. code-block:: javascript
9191
:copyable: false
9292

93-
{ prodId: 100, numPurchased: 20, price: 20 },
94-
{ prodId: 101, numPurchased: 10, price: 10 },
95-
{ prodId: 102, numPurchased: 5, price: 15 },
96-
{ prodId: 103, numPurchased: 15, price: 17 },
97-
{ prodId: 103, numPurchased: 20, price: 17 },
98-
{ prodId: 102, numPurchased: 1, price: 15 },
99-
{ prodId: 101, numPurchased: 5, price: 10 },
100-
{ prodId: 100, numPurchased: 10, price: 20 },
101-
{ prodId: 103, numPurchased: 30, price: 17 }
93+
{ orderId: 201, prodId: 100, numPurchased: 20, price: 20 },
94+
{ orderId: 202, prodId: 101, numPurchased: 10, price: 10 },
95+
{ orderId: 203, prodId: 102, numPurchased: 5, price: 15 },
96+
{ orderId: 204, prodId: 103, numPurchased: 15, price: 17 },
97+
{ orderId: 205, prodId: 103, numPurchased: 20, price: 17 },
98+
{ orderId: 206, prodId: 102, numPurchased: 1, price: 15 },
99+
{ orderId: 207, prodId: 101, numPurchased: 5, price: 10 },
100+
{ orderId: 208, prodId: 100, numPurchased: 10, price: 20 },
101+
{ orderId: 209, prodId: 103, numPurchased: 30, price: 17 }
102102

103103
Query the View
104104
~~~~~~~~~~~~~~
@@ -123,8 +123,9 @@ The output is:
123123
:copyable: false
124124

125125
[
126-
{ _id: 100, amountSold: 600 },
127-
{ _id: 103, amountSold: 1105 },
126+
{ _id: 102, amountSold: 90 },
128127
{ _id: 101, amountSold: 150 },
129-
{ _id: 102, amountSold: 90 }
128+
{ _id: 103, amountSold: 1105 },
129+
{ _id: 100, amountSold: 600 }
130130
]
131+

0 commit comments

Comments
 (0)