Date Code >>3/1/2009 A >>3/1/2009 P >>3/1/2009 W >>3/1/2009 P >>Giving a result of
>>Param Date Met Total >>"A" 3/1/2009 1 4 >>"W" 3/1/2009 1 4 >>"P" 3/1/2009 2 4 >>>
>select T.Param, T.Date, Count(*) as Met, Der.Total from myTable T inner join (select Date, count(*) as Total from myTable group by Date where Date = ?v_Date) Der >ON T.Date = Der.Date >group by T.Date, T.Param where T.Date = ?v_DateUsing VFP 8.1. Which may answer this question: is joining to a Select a new feature in VFP 9? At the moment it's throwing an error on that line.