On 21 Dec 2013, at 8:24pm, Giuseppe Costanzi <giuseppecosta...@gmail.com> wrote:
> On Sat, Dec 21, 2013 at 9:11 PM, Simon Slavin <slav...@bigfraud.org> wrote: > >> On 21 Dec 2013, at 7:45pm, Giuseppe Costanzi <giuseppecosta...@gmail.com> >> wrote: >> >>> I am not sure to have understood the Igor's solution >>> >>> ...SUM(stats.quantity * (stats.which_month = 1)) AS gen.... >>> >>> which is the meaning of the operator * in the statement? >> >> Multiply. >> >> It works because "stats.which_month = 1" is a boolean and therefore >> evaluates to either 0 or 1. ...but stats.which_month is not a boolean, it represent a month... However "(stats.which_month = 1)" is a boolean. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users