Can anyone help me out here to find out the error in this small query.
select count(txno) as c1, rxno from mrgrxtxt
group by rxno;
[Error Code: -217, SQL State: IX000] Column (c1) not found in any table in the query (or SLV is undefined).
where c1 >1
Or do the
GROUP BY part in a derived table:
select c1, rxno from ( select count(txno) as c1, rxno from mrgrxtxt group by rxno ) where c1 > 1;
Very convenient when more complex aggregations. (Less typing, and smaller risk of errors when duplicating or adjusting expressions.)