Skip to content

Commit 4d9ac8d

Browse files
authored
Improve consistency and a typo fix (#31)
* Capitalize all instances of 'AS' * Typo fix: repro -> repo
1 parent ca9da00 commit 4d9ac8d

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

Instructions/Labs/03a-joins.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ An inner join is used to find related data in two tables. For example, suppose y
2121
3. In the query editor, enter the following code:
2222

2323
```
24-
SELECT SalesLT.Product.Name As ProductName, SalesLT.ProductCategory.Name AS Category
24+
SELECT SalesLT.Product.Name AS ProductName, SalesLT.ProductCategory.Name AS Category
2525
FROM SalesLT.Product
2626
INNER JOIN SalesLT.ProductCategory
2727
ON SalesLT.Product.ProductCategoryID = SalesLT.ProductCategory.ProductCategoryID;
@@ -32,7 +32,7 @@ An inner join is used to find related data in two tables. For example, suppose y
3232
5. Modify the query as follows to remove the **INNER** keyword, and re-run it.
3333
3434
```
35-
SELECT SalesLT.Product.Name As ProductName, SalesLT.ProductCategory.Name AS Category
35+
SELECT SalesLT.Product.Name AS ProductName, SalesLT.ProductCategory.Name AS Category
3636
FROM SalesLT.Product
3737
JOIN SalesLT.ProductCategory
3838
ON SalesLT.Product.ProductCategoryID = SalesLT.ProductCategory.ProductCategoryID;
@@ -43,9 +43,9 @@ An inner join is used to find related data in two tables. For example, suppose y
4343
6. Modify the query to assign aliases to the tables in the **JOIN** clause, as shown here:
4444
4545
```
46-
SELECT p.Name As ProductName, c.Name AS Category
46+
SELECT p.Name AS ProductName, c.Name AS Category
4747
FROM SalesLT.Product AS p
48-
JOIN SalesLT.ProductCategory As c
48+
JOIN SalesLT.ProductCategory AS c
4949
ON p.ProductCategoryID = c.ProductCategoryID;
5050
```
5151
@@ -54,7 +54,7 @@ An inner join is used to find related data in two tables. For example, suppose y
5454
8. Replace the query with the following code, which retrieves sales order data from the **SalesLT.SalesOrderHeader**, **SalesLT.SalesOrderDetail**, and **SalesLT.Product** tables:
5555
5656
```
57-
SELECT oh.OrderDate, oh.SalesOrderNumber, p.Name As ProductName, od.OrderQty, od.UnitPrice, od.LineTotal
57+
SELECT oh.OrderDate, oh.SalesOrderNumber, p.Name AS ProductName, od.OrderQty, od.UnitPrice, od.LineTotal
5858
FROM SalesLT.SalesOrderHeader AS oh
5959
JOIN SalesLT.SalesOrderDetail AS od
6060
ON od.SalesOrderID = oh.SalesOrderID
@@ -143,8 +143,8 @@ A *cross* join matches all possible combinations of rows from the tables being j
143143
144144
```
145145
SELECT p.Name, c.FirstName, c.LastName, c.EmailAddress
146-
FROM SalesLT.Product as p
147-
CROSS JOIN SalesLT.Customer as c;
146+
FROM SalesLT.Product AS p
147+
CROSS JOIN SalesLT.Customer AS c;
148148
```
149149
150150
2. Run the query and note that the results contain a row for every product and customer combination (which might be used to create a mailing campaign in which an indivdual advertisement for each product is emailed to each customer - a strategy that may not endear the company to its customers!).
@@ -157,7 +157,7 @@ A *self* join isn't actually a specific kind of join, but it's a technique used
157157
158158
```
159159
SELECT pcat.Name AS ParentCategory, cat.Name AS SubCategory
160-
FROM SalesLT.ProductCategory as cat
160+
FROM SalesLT.ProductCategory AS cat
161161
JOIN SalesLT.ProductCategory pcat
162162
ON cat.ParentProductCategoryID = pcat.ProductCategoryID
163163
ORDER BY ParentCategory, SubCategory;
@@ -265,9 +265,9 @@ This section contains suggested solutions for the challenge queries.
265265
```
266266
SELECT pcat.Name AS ParentCategory, cat.Name AS SubCategory, prd.Name AS ProductName
267267
FROM SalesLT.ProductCategory pcat
268-
JOIN SalesLT.ProductCategory as cat
268+
JOIN SalesLT.ProductCategory AS cat
269269
ON pcat.ProductCategoryID = cat.ParentProductCategoryID
270-
JOIN SalesLT.Product as prd
270+
JOIN SalesLT.Product AS prd
271271
ON prd.ProductCategoryID = cat.ProductCategoryID
272272
ORDER BY ParentCategory, SubCategory, ProductName;
273273
```

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
## How do I contribute?
2525

26-
- Any MCT can submit a pull request to the code or content in the GitHub repro, Microsoft and the course author will triage and include content and lab code changes as needed.
26+
- Any MCT can submit a pull request to the code or content in the GitHub repo, Microsoft and the course author will triage and include content and lab code changes as needed.
2727

2828
- You can submit bugs, changes, improvement and ideas. Find a new Azure feature before we have? Submit a new demo!
2929

0 commit comments

Comments
 (0)