i need to take all data if Page!=@page, get AllDATA
select count(page) as TARIH,
(datepart(hour,Date)*60+datepart(minute,Date))/@countgap as SIRA
from scr_SecuristLog
where Date between @date1 and @date2 and Page=@page or Page = AllDATA