几个SQL语句(备忘)
2017-03-02 10:50
260 查看
1.三涨停 select biao1.代码,biao1.名称 from biao1,biao2,biao3 where (biao1.涨幅+ biao2.涨幅+biao3.涨幅)>0.27 and (biao1.代码
= biao2.代码) and (biao2.代码 = biao3.代码) and not exists (select * from biaoxg where 代码=biao1.代码)
2.二涨停
select biao1.代码,biao1.名称 from biao1,biao2 where (biao1.涨幅+ biao2.涨幅)>0.18 and (biao1.代码 = biao2.代码)
and not exists (select * from biaoxg where 代码=biao1.代码)
3.一涨停
select biao1.代码,biao1.名称 from biao1 where biao1.涨幅>0.09 and not exists (select * from biaoxg where 代码
=biao1.代码)
4.跌停再 涨停 select biao1.代码,biao1.名称 from biao1,biao2 where biao1.涨幅>0.09 and biao2.涨幅<-0.09 and (biao1.代码 = biao2.
代码)
5.锤子 select biao1.代码,biao1.名称 from biao1 where biao1.今开=biao1.最高 and biao1.最新>biao1.最低 and ((biao1.最新-
biao1.最低)/biao1.最低)>0.03
select biao2.代码,biao2.名称 from biao2 where biao2.今开=biao2.最高 and biao2.最新>biao2.最低 and ((biao2.最新-
biao2.最低)/biao2.最低)>0.03
select biao3.代码,biao3.名称 from biao3 where biao3.今开=biao3.最高 and biao3.最新>biao3.最低 and ((biao3.最新-
biao3.最低)/biao3.最低)>0.03
select biao4.代码,biao4.名称 from biao4 where biao4.今开=biao4.最高 and biao4.最新>biao4.最低 and ((biao4.最新-
biao4.最低)/biao4.最低)>0.03
6. select t2.a1 as a11 ,t2.a2 as a22, t2.a3 as a33 ,t2.a4 as a44,t2.a6 as a66,t1.a1 as b1 from xg as t1 left JOIN (select a2,a1,a3,a4,a6 from hqlsz where a1='''+ Rdate[0]+''' ) as t2 on t2.a2=t1.a2 order by t1.a1 desc
= biao2.代码) and (biao2.代码 = biao3.代码) and not exists (select * from biaoxg where 代码=biao1.代码)
2.二涨停
select biao1.代码,biao1.名称 from biao1,biao2 where (biao1.涨幅+ biao2.涨幅)>0.18 and (biao1.代码 = biao2.代码)
and not exists (select * from biaoxg where 代码=biao1.代码)
3.一涨停
select biao1.代码,biao1.名称 from biao1 where biao1.涨幅>0.09 and not exists (select * from biaoxg where 代码
=biao1.代码)
4.跌停再 涨停 select biao1.代码,biao1.名称 from biao1,biao2 where biao1.涨幅>0.09 and biao2.涨幅<-0.09 and (biao1.代码 = biao2.
代码)
5.锤子 select biao1.代码,biao1.名称 from biao1 where biao1.今开=biao1.最高 and biao1.最新>biao1.最低 and ((biao1.最新-
biao1.最低)/biao1.最低)>0.03
select biao2.代码,biao2.名称 from biao2 where biao2.今开=biao2.最高 and biao2.最新>biao2.最低 and ((biao2.最新-
biao2.最低)/biao2.最低)>0.03
select biao3.代码,biao3.名称 from biao3 where biao3.今开=biao3.最高 and biao3.最新>biao3.最低 and ((biao3.最新-
biao3.最低)/biao3.最低)>0.03
select biao4.代码,biao4.名称 from biao4 where biao4.今开=biao4.最高 and biao4.最新>biao4.最低 and ((biao4.最新-
biao4.最低)/biao4.最低)>0.03
6. select t2.a1 as a11 ,t2.a2 as a22, t2.a3 as a33 ,t2.a4 as a44,t2.a6 as a66,t1.a1 as b1 from xg as t1 left JOIN (select a2,a1,a3,a4,a6 from hqlsz where a1='''+ Rdate[0]+''' ) as t2 on t2.a2=t1.a2 order by t1.a1 desc
相关文章推荐
- SQL核心语句(非常实用的几个技巧)
- 利用sql语句实现的几个功能
- 几个删除重复记录的SQL语句
- SQL语句 对表按某几个字段分组,并生成组内记录数范围内的随机序号.
- 几个删除重复记录的SQL语句(转)
- 几个不错的SQl语句
- 几个精彩的SQL语句
- 觉得比较经典的几个SQL语句
- 几个删除重复记录的SQL语句
- 关于几个比较经典的SQL语句
- mysql需要注意的几个sql语句
- SQL备忘-基本控制语句复习及@@ROWCOUNT陷阱纪实
- 几个有用的Sql语句(在Sql Server2000的查询分析器里测试通过)
- 几个SQL语句。截取带条件的字符串
- SQL核心语句(非常实用的几个技巧)
- SQL核心语句(非常实用的几个技巧)
- 几个sql语句
- 几个删除重复记录的SQL语句
- 几个容易忘记的SQL语句写法
- SQL核心语句(非常实用的几个技巧)