select id, (col1+col2+ col3)/3 as avgVal from T1 where id=123
试试这样行不行:SELECT orderId,MAX(type) AS maxtype FROM table WHERE id IN (100,101,102) GROUP BY orderId
欢迎分享,转载请注明来源:内存溢出
select id, (col1+col2+ col3)/3 as avgVal from T1 where id=123
试试这样行不行:SELECT orderId,MAX(type) AS maxtype FROM table WHERE id IN (100,101,102) GROUP BY orderId
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)