If Exists (Select * From sysobjects Where name = N'PersonRollup' And user_name(uid) = N'dbo')
Drop Table dbo.PersonRollup
Go
Create Table dbo.PersonRollup
(
PersonId int Not Null,
GroupId int Not Null,
ActivityTypeId int Not Null,
ActivityTypeAvg float(53) Not Null
)
Go
Alter Table dbo.PersonRollup Add Constraint
PK_Rollup Primary Key Nonclustered
(
PersonId,
GroupId,
ActivityTypeId
)
Go