CREATE TABLE [dbo].[TransLog](
[TransactionID] [int] IDENTITY(1,1) NOT NULL,
[ID] [int] NULL CONSTRAINT [SomeContraint] DEFAULT ((0)),
[Type] [nvarchar](5) NULL,
[Name] [nvarchar](800) NULL,
[ActionType] [nvarchar](800) NULL,
[UserID] [nvarchar](15) NULL,
[LogDateTime] [datetime] NULL,
CONSTRAINT [Trans_PK] PRIMARY KEY NONCLUSTERED
(
[TransactionID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
Data on the table is in the format below.
111630 1345 SomeType Page1 Display User1 2013-01-23 13:11:15.000
111631 1345 SomeType Page2 Save User1 2013-01-23 13:12:05.000
111630 1345 SomeType Page1 Display User1 2013-01-23 16:11:15.000
111631 1345 SomeType Page2 Save User1 2013-01-23 18:12:05.000
Expected Results
User1 Spent X number of minutes on a page1 and User1 spent x number of minutes on ID 1345
Is calculating time with a single column possible