Reputation: 137
I have a table with two fields.
I need to count occurence of data of field2 based on field1 . Like a(field1) - x(field2) - 1(occurrence of x for a ) , a - y - 2 , b-z-1 for all a b c d
Upvotes: 0
Views: 83
Reputation: 137
Solved this problem :
DEFINE VARIABLE i AS INTEGER NO-UNDO.
FOR EACH ttPTdetails NO-LOCK BREAK BY ttPTdetails.sentdate BY stat :
i = i + 1.
IF LAST-OF(stat) THEN DO:
DISPLAY ttPTdetails.sentdate (ttPTdetails.stat ) i.
i = 0.
END.
END.
Upvotes: 0