>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.
I was thinking about your problem and I believe it can also be solved with projection, e.g.
select my.*, ;
(select count(*) as TotalAbsences ;
from myTable where Category = 'A' and ;
myTable.StudentID = my.StudentID) as TotalAbsences ;
from myTable my ;
having TotalAbsences >=6
Not tested.
If it's not broken, fix it until it is.
My Blog