select * from table where fieldname1='1' group by fieldname2;fieldname2必须是integer或date(time)型!!
select * from table where fieldname1='1' group by fieldname2;* 处必须是计算出来的对于同一个fieldname2有一个确定值的,或是在group by 的表达式中的如 select f1,f2,sum(f3),cont(f4),max(f5) from table where 条件表达式 group by f1,f2 条件表达式 可以是什么你说呢? 你可以试试吗?
select f1,f2,sum(f3),cont(f4),max(f5)
from table
where 条件表达式
group by f1,f2
条件表达式 可以是什么你说呢?
你可以试试吗?