Ok, I've gotten a bit further, I created a start and end time for each call.
I can now visually display the data, but I need help totaling the number of x's in each column (hour).
select phonedate,
case
When 0 Between onphone And offphone then 'x' else '' end as [0],
case
When 1 Between onphone And offphone then 'x' else '' end as [1],
case
When 2 Between onphone And offphone then 'x' else '' end as [2],
case
When 3 Between onphone And offphone then 'x' else '' end as [3],
case
When 4 Between onphone And offphone then 'x' else '' end as [4],
case
When 5 Between onphone And offphone then 'x' else '' end as [5],
case
When 6 Between onphone And offphone then 'x' else '' end as [6],
case
When 7 Between onphone And offphone then 'x' else '' end as [7],
case
When 8 Between onphone And offphone then 'x' else '' end as [8],
case
When 9 Between onphone And offphone then 'x' else '' end as [9],
case
When 10 Between onphone And offphone then 'x' else '' end as [10],
case
When 11 Between onphone And offphone then 'x' else '' end as [11],
case
When 12 Between onphone And offphone then 'x' else '' end as [12],
case
When 13 Between onphone And offphone then 'x' else '' end as [13],
case
When 14 Between onphone And offphone then 'x' else '' end as [14],
case
When 15 Between onphone And offphone then 'x' else '' end as [15],
case
When 16 Between onphone And offphone then 'x' else '' end as [16],
case
When 17 Between onphone And offphone then 'x' else '' end as [17],
case
When 18 Between onphone And offphone then 'x' else '' end as [18],
case
When 19 Between onphone And offphone then 'x' else '' end as [19],
case
When 20 Between onphone And offphone then 'x' else '' end as [20],
case
When 21 Between onphone And offphone then 'x' else '' end as [21],
case
When 22 Between onphone And offphone then 'x' else '' end as [22],
case
When 23 Between onphone And offphone then 'x' else '' end as [23]
Phonedata
RESULTS.....(Date, then Hour 0-23)
Dec 12 2008 0 0 0 0 0 0 0 x x x x 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 x x x x 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x x 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 x x x x x 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x x x 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x x 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x x x 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x x x 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x x 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x x x 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x x 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x x x x x x x 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 x x x x 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0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2008 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 x x 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 x x 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x x 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x 0 0 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x x x 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x 0 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x 0 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x 0 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x 0 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x x x 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x x 0 0
Dec 12 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
How do I count each column to get total of x's per hour?