You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Instructions/Labs/03a-joins.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ An inner join is used to find related data in two tables. For example, suppose y
21
21
3. In the query editor, enter the following code:
22
22
23
23
```
24
-
SELECT SalesLT.Product.Name As ProductName, SalesLT.ProductCategory.Name AS Category
24
+
SELECT SalesLT.Product.Name AS ProductName, SalesLT.ProductCategory.Name AS Category
25
25
FROM SalesLT.Product
26
26
INNER JOIN SalesLT.ProductCategory
27
27
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
32
32
5. Modify the query as follows to remove the **INNER** keyword, and re-run it.
33
33
34
34
```
35
-
SELECT SalesLT.Product.Name As ProductName, SalesLT.ProductCategory.Name AS Category
35
+
SELECT SalesLT.Product.Name AS ProductName, SalesLT.ProductCategory.Name AS Category
36
36
FROM SalesLT.Product
37
37
JOIN SalesLT.ProductCategory
38
38
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
43
43
6. Modify the query to assign aliases to the tables in the **JOIN** clause, as shown here:
44
44
45
45
```
46
-
SELECT p.Name As ProductName, c.Name AS Category
46
+
SELECT p.Name AS ProductName, c.Name AS Category
47
47
FROM SalesLT.Product AS p
48
-
JOIN SalesLT.ProductCategory As c
48
+
JOIN SalesLT.ProductCategory AS c
49
49
ON p.ProductCategoryID = c.ProductCategoryID;
50
50
```
51
51
@@ -54,7 +54,7 @@ An inner join is used to find related data in two tables. For example, suppose y
54
54
8. Replace the query with the following code, which retrieves sales order data from the **SalesLT.SalesOrderHeader**, **SalesLT.SalesOrderDetail**, and **SalesLT.Product** tables:
55
55
56
56
```
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
58
58
FROM SalesLT.SalesOrderHeader AS oh
59
59
JOIN SalesLT.SalesOrderDetail AS od
60
60
ON od.SalesOrderID = oh.SalesOrderID
@@ -143,8 +143,8 @@ A *cross* join matches all possible combinations of rows from the tables being j
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
157
157
158
158
```
159
159
SELECT pcat.Name AS ParentCategory, cat.Name AS SubCategory
160
-
FROM SalesLT.ProductCategory as cat
160
+
FROM SalesLT.ProductCategory AS cat
161
161
JOIN SalesLT.ProductCategory pcat
162
162
ON cat.ParentProductCategoryID = pcat.ProductCategoryID
163
163
ORDER BY ParentCategory, SubCategory;
@@ -265,9 +265,9 @@ This section contains suggested solutions for the challenge queries.
265
265
```
266
266
SELECT pcat.Name AS ParentCategory, cat.Name AS SubCategory, prd.Name AS ProductName
267
267
FROM SalesLT.ProductCategory pcat
268
-
JOIN SalesLT.ProductCategory as cat
268
+
JOIN SalesLT.ProductCategory AS cat
269
269
ON pcat.ProductCategoryID = cat.ParentProductCategoryID
270
-
JOIN SalesLT.Product as prd
270
+
JOIN SalesLT.Product AS prd
271
271
ON prd.ProductCategoryID = cat.ProductCategoryID
272
272
ORDER BY ParentCategory, SubCategory, ProductName;
Copy file name to clipboardExpand all lines: readme.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@
23
23
24
24
## How do I contribute?
25
25
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.
27
27
28
28
- You can submit bugs, changes, improvement and ideas. Find a new Azure feature before we have? Submit a new demo!
0 commit comments