/*
WITH tab AS (
SELECT 453 CustomerID, to_date('01-11-14', 'dd-mm-yy') CallDate FROM dual
UNION ALL SELECT 453, to_date('13-11-14', 'dd-mm-yy') FROM dual
union all select 351, to_date('01-12-14', 'dd-mm-yy') FROM dual
UNION ALL SELECT 453, to_date('15-11-14', 'dd-mm-yy') FROM dual
union all select 441, to_date('02-12-14', 'dd-mm-yy') FROM dual
UNION ALL SELECT 102, to_date('03-12-14', 'dd-mm-yy') FROM dual
union all select 453, to_date('03-12-14', 'dd-mm-yy') FROM dual
UNION ALL SELECT 441, to_date('05-12-14', 'dd-mm-yy') FROM dual
union all select 453, to_date('05-12-14', 'dd-mm-yy') FROM dual
UNION ALL SELECT 453, to_date('06-12-14', 'dd-mm-yy') FROM dual
)
*/
SELECT CustomerID, CallDate,
count(CallDate) OVER(PARTITION BY CustomerID ORDER BY CallDate RANGE BETWEEN 5 PRECEDING AND CURRENT ROW) - 1 repeat_count
FROM tab order by 2;