根据这个查询,我缺少了什么:8 w6 n+ Y, Z/ r9 b M* ?
SELECT mymonth,Header1FROM(SELECT month(startdatetime) as mymonth,(CASE WHEN MyTable.somecolumn =2 THEN count(somecolumn2) END) as Header1FROM MyTable WHERE year(startdatetime)=2013group by startdatetime) xGROUP BY Header1我在某个地方说Informix不支持按别名分组,但试图设置GROUP BY 2时出现红色错误,列标题1必须位于Group by子句中 ( [9 s* Q+ R8 M 1 }$ K& H' @6 `) u3 i, y6 y5 B 解决方案: