>Sorry, Naomi i have not understand.
>My table name is dlyatten and filed name is Category and in Category i want to count the records if A,A,A is adjasent.
>e.g
>A is absent of student. ( it is dialy attend (roll call) from.
>I want to see a student if he make six absences regulary.
Ok, let's try based on my original idea:
select DlyAtten.*, SQLCount.Absences from DlyAtten inner join
(select StudentID, Category, count(Category) as Absences
from DlyAtten group by 1,2 having Absences >=6)) SQLCount
on DlyAtten.StudentID = SQLCount.StudentID
Not tested.
If it's not broken, fix it until it is.
My Blog