>>It looks correct to me. Would it work if you ran just second select?
>
>No, same problem when running only the second select. It's still SQL: GROUP BY missing or invalid.
It sounds like you've a memo field in the column list. You cannot grou on memo field.
--sb--