create procedure [dbo].[GetTheSalesOfSalesPerson] as begin select h.SalesPersonID, p.LastName, p.MiddleName, p.FirstName , h.SalesOrderNumber , h.OrderDate , s.Name as CustomerName from Person.Person p join Sales.SalesOrderHeader h on h.SalesPersonID = p.BusinessEntityID join Sales.Customer c on c.CustomerID = h.CustomerID join Sales.Store s on s.BusinessEntityID = c.StoreID where h.OrderDate >= convert(date, '2008-01-01') order by h.SalesPersonID; end;
20 Steps (all in pictures)
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
No comments:
Post a Comment