On 2/21/2014 3:11 PM, David Bicking wrote:
But I am curious, wouldn't this yield a "Statuses" for key 2 of 'C+', when it
should be 'O'?
You could use the same technique there. The technique lets you know
whether you have only C's, only non-C's, or a mix of the two, and act
accordingly.
For example, you could replace min(STATUS) with something like
case when sum(STATUS != 'C') then min(case when STATUS='C' then 'ZZZ'
else STATUS end) else 'C' end
This returns the smallest of statuses other than C if any, and C otherwise.
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users