高分求救
"select * from ( select (select code from kklw.checkpoint_code where code=kkbh and type= '2 ') code, "+
"(select display from kklw.checkpoint_code where code=t1.kkbh ) diaplay, "+
"sum(t1.jsl)+sum(t1.csl) ,sum(t1.jsl) ,sum(t1.csl) ,sum(t1.sbsl),sum(t1.wsbsl) "+
" from kklw.vehicle_flow_statis_hour t1 where t1.sj> = ' "+weekstart0+ " ' and t1.sj <= ' "+weekend0+ " ' "+
"group by t1.kkbh) t where t.code is not null ";
t和t1是什么,为什么要用他们
------解决方案--------------------t和t1 都是表名代替 ,你完全可以用a ,b 来代替,
也可以不用,如果你不闲麻烦写表的名字
------解决方案--------------------是别名,你可以随便取的。
------解决方案--------------------别名
------解决方案--------------------t,t1是表的别名;
code,diaplay是对应所作选取列的别名,
为了书写和阅读直观,明了!
------解决方案--------------------表名有时过长。为减少语句长度简捷不易出错