查询最新单价 select t1.item,unit from (select item,max(date) mdate from tbname group by item) t1,tbname where t1.item = tbname.item and t1.mdate = tbname.date; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from yourtable t1where t1.date = (select max(date) from yourtable t2 where t2.itme = t1.item) to cyberflying(雁南飞) 有问题,若另一个itme有相同日期也会被查出来select a.* from table a where (a.item,a.date) in (select item,max(date) mdate from table b group by item) 楼上:不会错的。有where t2.itme = t1.item,就不会有另一个item的问题! 怎样联机备份表空间 ORACLE 无法从套接字读取更多的数据 错误 一道SQL的面试题 imp db,报“不支持要求的字符集转换(从类型178到852)” 谁帮我看看这条语句哪里错了? 多台子数据库服务器与总数据库服务器的同步工具 第一次用toad连oracle,有点问题 系统重启与oracle是否相关 问一个statspack问题 想学Oracle不知道够不够格 在前台访问oracle中的表时,表名必须大写吗??? 菜鸟急问:如何导入导出Oracle整个数据库的结构及数据??立刻结分!!
where t1.date = (select max(date)
from yourtable t2
where t2.itme = t1.item)
不会错的。
有where t2.itme = t1.item,就不会有另一个item的问题!