I have the next tabble: No: Name: LastPayDate DayPayed:01 Piet 30-01-2001 15-01-200102 Piet 28-02-2001 11-02-200103 Piet 30-03-2001 18-03-200104 Piet 30-04-2001 17-04-200105 Piet 30-05-2001 04-06-200106 Piet 30-06-200107 Henk 30-01-2001 15-01-200108 Henk 28-02-2001 11-02-200109 Henk 30-03-2001 12-04-2001
Now I want with a SQL string to get the next recordset: Name, NumberPayed, TooLate: Name: NumberPayed: TooLate:Piet 5 1Henk 3 1
To get NumberPayed is no problem. That is Count(DayPayed), and it needs to be grouped by name. My probles is that I do not know I can calculate TooLate. Is it possible to use an expression on the Count function for example Count(DayPayed-LastPayDate when < 0)??????? If somebody can help me out..... Thank you... Edited by - kHebTrekInWatLekkers on 08/14/2001 03:48:59