DECLARE	@Disks TABLE
	(
		computername varchar(20),
		drive varchar(3),
		freespace int,
		datestamp datetime
	)

SET DATEFORMAT DMY

INSERT	@Disks
SELECT	'computer 1', 'c:', 40000, '01/12/2007' UNION ALL
SELECT	'computer 1', 'c:', 39500, '15/12/2007' UNION ALL
SELECT	'computer 1', 'c:', 39500, '28/12/2007' UNION ALL
SELECT	'computer 1', 'c:', 39500, '01/01/2008' UNION ALL
SELECT	'computer 1', 'c:', 37000, '15/01/2008' UNION ALL
SELECT	'computer 1', 'c:', 36000, '28/01/2008' UNION ALL
SELECT	'computer 1', 'c:', 35000, '01/02/2008' UNION ALL
SELECT	'computer 1', 'c:', 34000, '15/02/2008' UNION ALL
SELECT	'computer 1', 'c:', 33000, '28/02/2008' UNION ALL
SELECT	'computer 1', 'c:', 32000, '01/03/2008' UNION ALL
SELECT	'computer 1', 'c:', 31000, '15/03/2008' UNION ALL
SELECT	'computer 1', 'c:', 30000, '28/03/2008' UNION ALL
SELECT	'computer 1', 'c:', 29000, '01/04/2008' UNION ALL
SELECT	'computer 1', 'c:', 28000, '15/04/2008' UNION ALL
SELECT	'computer 1', 'c:', 27000, '28/04/2008' UNION ALL
SELECT	'server 1',   'c:', 99000, '01/12/2007' UNION ALL
SELECT	'server 1',   'c:', 95000, '15/12/2007' UNION ALL
SELECT	'server 1',   'c:', 91000, '28/12/2007' UNION ALL
SELECT	'server 1',   'c:', 87000, '01/01/2008' UNION ALL
SELECT	'server 1',   'c:', 83000, '15/01/2008' UNION ALL
SELECT	'server 1',   'c:', 79000, '28/01/2008' UNION ALL
SELECT	'server 1',   'c:', 75000, '01/02/2008' UNION ALL
SELECT	'server 1',   'c:', 71000, '15/02/2008' UNION ALL
SELECT	'server 1',   'c:', 67000, '28/02/2008' UNION ALL
SELECT	'server 1',   'c:', 63000, '01/03/2008' UNION ALL
SELECT	'server 1',   'c:', 59000, '15/03/2008' UNION ALL
SELECT	'server 1',   'c:', 55000, '28/03/2008' UNION ALL
SELECT	'server 1',   'c:', 51000, '01/04/2008' UNION ALL
SELECT	'server 1',   'c:', 47000, '15/04/2008' UNION ALL
SELECT	'server 1',   'c:', 43000, '28/04/2008' UNION ALL
SELECT	'server 1',   'z:', 98000, '01/12/2007' UNION ALL
SELECT	'server 1',   'z:', 96000, '15/12/2007' UNION ALL
SELECT	'server 1',   'z:', 94000, '28/12/2007' UNION ALL
SELECT	'server 1',   'z:', 92000, '01/01/2008' UNION ALL
SELECT	'server 1',   'z:', 90000, '15/01/2008' UNION ALL
SELECT	'server 1',   'z:', 88000, '28/01/2008' UNION ALL
SELECT	'server 1',   'z:', 86000, '01/02/2008' UNION ALL
SELECT	'server 1',   'z:', 84000, '15/02/2008' UNION ALL
SELECT	'server 1',   'z:', 82000, '28/02/2008' UNION ALL
SELECT	'server 1',   'z:', 80000, '01/03/2008' UNION ALL
SELECT	'server 1',   'z:', 78000, '15/03/2008' UNION ALL
SELECT	'server 1',   'z:', 76000, '28/03/2008' UNION ALL
SELECT	'server 1',   'z:', 74000, '01/04/2008' UNION ALL
SELECT	'server 1',   'z:', 72000, '15/04/2008' UNION ALL
SELECT	'server 1',   'z:', 70000, '28/04/2008' UNION ALL
SELECT	'server 1',   'e:', 95000, '01/12/2007' UNION ALL
SELECT	'server 1',   'e:', 90000, '15/12/2007' UNION ALL
SELECT	'server 1',   'e:', 85000, '28/12/2007' UNION ALL
SELECT	'server 1',   'e:', 80000, '01/01/2008' UNION ALL
SELECT	'server 1',   'e:', 75000, '15/01/2008' UNION ALL
SELECT	'server 1',   'e:', 70000, '28/01/2008' UNION ALL
SELECT	'server 1',   'e:', 65000, '01/02/2008' UNION ALL
SELECT	'server 1',   'e:', 60000, '15/02/2008' UNION ALL
SELECT	'server 1',   'e:', 55000, '28/02/2008' UNION ALL
SELECT	'server 1',   'e:', 50000, '01/03/2008' UNION ALL
SELECT	'server 1',   'e:', 45000, '15/03/2008' UNION ALL
SELECT	'server 1',   'e:', 40000, '28/03/2008' UNION ALL
SELECT	'server 1',   'e:', 35000, '01/04/2008' UNION ALL
SELECT	'server 1',   'e:', 30000, '15/04/2008' UNION ALL
SELECT	'server 1',   'e:', 25000, '28/04/2008' UNION ALL
SELECT	'computer 2', 'c:', 40000, '01/12/2007' UNION ALL
SELECT	'computer 2', 'c:', 40000, '15/12/2007' UNION ALL
SELECT	'computer 2', 'c:', 40000, '28/12/2007' UNION ALL
SELECT	'computer 2', 'c:', 38000, '01/01/2008' UNION ALL
SELECT	'computer 2', 'c:', 36000, '15/01/2008' UNION ALL
SELECT	'computer 2', 'c:', 24000, '28/01/2008' UNION ALL
SELECT	'computer 2', 'c:', 19000, '01/02/2008' UNION ALL
SELECT	'computer 2', 'c:', 18000, '15/02/2008' UNION ALL
SELECT	'computer 2', 'c:', 17500, '28/02/2008' UNION ALL
SELECT	'computer 2', 'c:', 17000, '01/03/2008' UNION ALL
SELECT	'computer 2', 'c:', 16500, '15/03/2008' UNION ALL
SELECT	'computer 2', 'c:', 16000, '28/03/2008' UNION ALL
SELECT	'computer 2', 'c:', 15500, '01/04/2008' UNION ALL
SELECT	'computer 2', 'c:', 15000, '15/04/2008' UNION ALL
SELECT	'computer 2', 'c:', 14500, '28/04/2008'

SELECT		ComputerName,
		Drive,
		dbo.Linear(CAST(DateStamp AS FLOAT), freespace)
FROM		@Disks
GROUP BY	ComputerName,
		Drive
ORDER BY	ComputerName,
		Drive

SELECT		ComputerName,
		dbo.Linear(CAST(DateStamp AS FLOAT), freespace)
FROM		@Disks
GROUP BY	ComputerName
ORDER BY	ComputerName