Viewing 2 posts - 1 through 2 (of 2 total)
This could help point you in correct direction, regardless of the number of accidents
CREATE TABLE #tblDrivers (DriverID Int, AccidentDate date)
INSERT INTO #tblDrivers(DriverID,AccidentDate)
VALUES (1,'03/01/2012'),
(1,'05/06/2015'),
(2,'08/05/2013'),
(3,'12/01/2011'),
(4,'06/22/2005'),
(4,'04/01/2008'),
(4,'11/21/2010')
GO
CREATE TABLE #tblDrivingSchool...
May 30, 2016 at 3:08 am
This could help you...
CREATE TABLE #tblDrivers (DriverID Int, AccidentDate date)
INSERT INTO #tblDrivers(DriverID,AccidentDate)
VALUES (1,'03/01/2012'),
(1,'05/06/2015'),
(2,'08/05/2013'),
(3,'12/01/2011'),
(4,'06/22/2005'),
(4,'04/01/2008'),
(4,'11/21/2010')
GO
CREATE TABLE #tblDrivingSchool (DriverID Int, ClassDate date)
INSERT INTO #tblDrivingSchool (DriverID,ClassDate)
values
(1,'03/15/2012'),
(3,'12/18/2011'),
(4,'07/10/2005')...
May 30, 2016 at 3:05 am
Viewing 2 posts - 1 through 2 (of 2 total)