from the the full list## create a colour distance matrix (cdm), ie a pairwise comparison of "similarity" between the five matrices stored in A3## remove colum
declare @td int count(*) as total, when dateadd(s, cdm[StartTime], '19700101') >= '2013-07-31 00:00:00.000' and dateadd(s, cdm.[CDRMAIN] as cdmcdm.LocalDay = @td
AND cdm</em