怎样实现最大值相加? ls_h sl hp_h1 100 0011 200 0011 300 0012 150 0012 700 001求出hp_h是001 的最大值的和就是 300+700=1000 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select sum(sl) slfrom ( select max(sl) sl from tb group by ls_h) as t select sum(sl) slfrom ( select max(sl) sl from tb group by ls_h where hp_h='001') as tMODIFY select sum(sl) slfrom ( select max(sl) sl from tb where hp_h='001' group by ls_h) as t不好意思,手误,以此为准 select sum(sl) as s from (select max(sl) as sl ,ls_h from tb group by ls_h) as ts 非安装版的mysql,它的密码怎么设置啊 要是没有密码在JDBC连接时 新安装的SQLSERVER2000新建包出现错误 如何临时性禁止主键自动加1? 初学者提问 比较复杂的sql语句,如何写 高分求解一道设计产品N层分类的SQL题目 一个好奇怪的SQL运行速度慢的问题 [同步]如何用(存储过程和计划)、(DTS)、(复制)三种方法实现数据同步?请各位高手各抒己见,以解燃眉之急。(欢迎大家来讨论,分不 一个简单的多表统计问题。 SQL server Update触发器怎么写 需要批量写入数据库,帮分析如何写 sql server2008怎么导出所有作业的脚本?
from (
select max(sl) sl
from tb
group by ls_h
) as t
from (
select max(sl) sl
from tb
group by ls_h
where hp_h='001'
) as tMODIFY
from (
select max(sl) sl
from tb
where hp_h='001'
group by ls_h
) as t不好意思,手误,以此为准