sql 多表去除重复数据
来源:互联网 发布:卖家加入淘宝联盟首页 编辑:程序博客网 时间:2024/06/08 18:34
with temp as (
select a.*,prices.price as retprice,prices.indate from tourname as a join
(select b.tourname,c.price,b.indate from tourgroup as b join groupprice as c on c.groupno=b.groupno
where c.item='1') as prices on a.tourname=prices.tourname and prices.indate>=getdate() and grp='粤北'
)
select * from temp as a where indate=(select min(indate) from temp as b where a.tourname=b.tourname)
select a.*,prices.price as retprice,prices.indate from tourname as a join
(select b.tourname,c.price,b.indate from tourgroup as b join groupprice as c on c.groupno=b.groupno
where c.item='1') as prices on a.tourname=prices.tourname and prices.indate>=getdate() and grp='粤北'
)
select * from temp as a where indate=(select min(indate) from temp as b where a.tourname=b.tourname)
- sql 多表去除重复数据
- SQL 去除重复数据
- SQL去除重复数据
- SQL去除重复数据
- sql 去除重复数据 唯一
- sql语句-去除重复数据
- sql语句去除重复数据
- SQL 多表查询去除重复
- 去除完全重复的数据sql语句
- 去除重复数据的SQL语句
- 去除重复数据的SQL语句
- oracle中sql去除重复数据
- SQL去除重复删除重复数据(高效,大数据)
- SQL去除重复删除重复数据(高效)
- SQL 去除表中的重复列
- SQL去除重复记录
- sql去除重复语句
- sql去除重复语句
- Android DatePicker example
- 二分查找求函数的区间最小值&&http://acm.hdu.edu.cn/showproblem.php?pid=2899
- 杭电 4006 multiset 妙用
- 树状数组总结
- sys.arg[]
- sql 多表去除重复数据
- 内存映射文件原理探索
- 传苹果下月iOS弃“Google”转投“百度”搜索
- 基本的css式样学习一
- Spring MVC3 基本配置
- 用 Graphviz 可视化函数调用
- 第6周实验报告1
- Java文件路径(getResource)
- [MFC]程序外观修改