Lab 4 Part 1 : Table Joins and functions Overview
Using the Northwind database , you have been requested to select data for specific needs . Once selected , your data will be presented to management . You will have to determine which fields are the most appropriate to be selected . Do not include any fields that management does not need to see .
Below is a screenshot of the Northwind Database schema :
Log into SQL Server and access the database engine . Once into SQL Server ’ s database engine , select the Northwind database as usual . Part A
Northwind Traders deals with a number of suppliers . The Products table includes the supplier ID for each product . Go through the Products table and provide a count of the number of products from each company . The output should show the name of the supplier and a count of the number of products it supplies .
As you prepare to create this query , decide which information needs to be displayed – this will be listed in the SELECT clause . Review the tables to determine which tables to use – these will be listed in the FROM clause . This problem will require an aggregate function – which one ? What fields will be in the GROUP BY ? If more than one table is needed , how will these tables be joined ?
1 . Using the query window , type the SELECT statement needed to produce the desired results . The SQL is given below and after you ’ ve typed your query , click on the Execute button to run the query and see the results .
The first rows of your result set should look like this :