Hi Igor, C is not a present column, but is the result of an expression involving A and B (namely, the expression A / B).
Can you please take this into consideration and update the query you proposed? :)) Thanks, Mikael 2013/7/20 Igor Tandetnik <i...@tandetnik.org> > On 7/20/2013 9:54 AM, Mikael wrote: > >> So again, >> >> SELECT >> id, >> (SELECT [very complex subselect here, that uses categories.id as input]) >> AS >> a, >> (SELECT [another very complex subselect here, that uses categories.id as >> input]) AS b, >> a / b AS c >> FROM categories >> ORDER BY c; >> > > select id, a, b, a/b as c from ( > > SELECT > id, > (SELECT [very complex subselect here, that uses categories.id as input]) > AS > a, > (SELECT [another very complex subselect here, that uses categories.id as > input]) AS b > FROM categories > ) > ORDER BY c; > > -- > Igor Tandetnik > > > ______________________________**_________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users> > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users