Overview

CROSS JOIN

SELECT e.BusinessEntityID, d.Name AS [Department]
FROM HumanResources.Employee AS e
CROSS JOIN HumanResources.Department AS d;

FULL [OUTER] JOIN

SELECT p.Name, sod.SalesOrderID
FROM Production.Product AS p
FULL JOIN Sales.SalesOrderDetail AS sod
	ON p.ProductID = sod.ProductID

LEFT [OUTER] JOIN

SELECT p.Name, sod.SalesOrderID
FROM Production.Product AS p
LEFT JOIN Sales.SalesOrderDetail AS sod
	ON p.ProductID = sod.ProductID

RIGHT [OUTER] JOIN

SELECT st.Name AS Territory, sp.BusinessEntityID
FROM Sales.SalesTerritory AS st
RIGHT JOIN Sales.SalesPerson AS sp
	ON st.TerritoryID = sp.TerritoryID;

[INNER] JOIN

SELECT p.Name, sod.SalesOrderID
FROM Production.Product AS p
JOIN Sales.SalesOrderDetail AS sod
	ON p.ProductID = sod.ProductID

APPLY

SELECT [c].CustomerID, 
	AVG([y].OrderWeight) AS [AverageOrderWeight]
FROM Sales.Customer AS [c]
INNER JOIN Sales.SalesOrderHeader AS [soh]
	ON [soh].CustomerID = c.CustomerID
CROSS APPLY
(
	SELECT SUM([sod].[OrderQty] * [p].[Weight]) AS [OrderWeight]
	FROM Sales.SalesOrderDetail AS [sod]
	INNER JOIN Production.Product AS [p]
		ON [sod].ProductID = [p].ProductID
	WHERE [sod].SalesOrderID = [soh].SalesOrderID
	GROUP BY sod.SalesOrderID
) AS [y]
GROUP BY [c].CustomerID
ORDER BY [c].CustomerID;