Brian Gosnell Database Design and Application Virginia
ID: Primary Key, AutoNumber, acts as the identifier
Customer Name: Short Text
Billing Address: Short Text
City: Short Text
State: Short Text, field size of 2 with a default value of NE
ZIP Code: Short text, field size of 5
Amount Purchased: Currency, 2 decimal places
Sales Rep ID: Foreign key, Short Text, to be linked with Sales Rep table, field size of 3
Briar Woods High School Job 1
Brian Gosnell Database Design and Application Virginia
Sales Rep ID: Primary Key, Short Text, unique identifier for each representative, field size of 3
Last Name: Short Text
First Name: Short Text
Employment Date: Date/Time
Briar Woods High School Job 1
Brian Gosnell Database Design and Application Virginia
Briar Woods High School Job 2
Brian Gosnell Database Design and Application Virginia
Briar Woods High School Job 3
Brian Gosnell Database Design and Application Virginia
SELECT Customer.[Customer Name], Customer.[ID], Customer.[Amount Purchased]
FROM Customer;
Briar Woods High School Job 4
Brian Gosnell Database Design and Application Virginia
SELECT DISTINCT [Sales Rep].[Last Name], [Sales Rep].[Employment Date]
FROM [Sales Rep]
WHERE ((([Sales Rep].[Employment Date])<#9/9/2010#))
ORDER BY [Sales Rep].[Last Name], [Sales Rep].[Employment Date];
Briar Woods High School Job 5
Brian Gosnell Database Design and Application Virginia
Briar Woods High School Job 5
Brian Gosnell Database Design and Application Virginia
SELECT Customer.[Customer Name], [Sales Rep].[Sales Rep ID], Customer.[Amount Purchased]
FROM [Sales Rep] INNER JOIN Customer ON [Sales Rep].[Sales Rep ID] = Customer.[Sales Rep ID];
Briar Woods High School Job 6
Brian Gosnell Database Design and Application Virginia
SELECT [Sales Rep].[Last Name], [Sales Rep].[Sales Rep ID], Avg(Customer.[Amount Purchased]) AS
[AvgOfAmount Purchased]
FROM [Sales Rep] INNER JOIN Customer ON [Sales Rep].[Sales Rep ID] = Customer.[Sales Rep ID]
GROUP BY [Sales Rep].[Last Name], [Sales Rep].[Sales Rep ID]
ORDER BY [Sales Rep].[Sales Rep ID];
Briar Woods High School Job 7
Brian Gosnell Database Design and Application Virginia
Briar Woods High School Job 7
Brian Gosnell Database Design and Application Virginia
Briar Woods High School Job 8