The problem is that in each view you are including a
single non-aggregated return value (the second field,
which is a concatenation of two columns in the
database).

If you include aggregate and non-aggregate fields in
your result set you must include a GROUP BY clause in
the select including all non-aggregate fields.

In your case, since I think you're after a single row
in your result set limited by the WHERE clause, just
remove the non-aggregate expression or, if you must
have it, encase it in a call to MIN().

--
Larry

Reply via email to