>select PCID, max(qty) AS Qty, CAST(sum(iif(available, 1, 0)) AS I) as NO_AVAIL, CAST(sum(iif(available, 0, 1)) AS I) as NO_NOTAVAIL ;
>from myTable ;
>GROUPBY PCId
Good stuff.
I continued this in Message #1608597 over in the SQL area (I realize this was a VFP question), just to talk about conditional aggregation a little more.