[OPTION]
#趋势分析行数 2 或者 3
#22 24 29 31 35|04 11|00111|01|141|15|001|07-05-30#15 22 31 34 35|05 12|10101|10|137|17|002|07-06-02#03 04 18 23 32|01 06|10010|10|080|07|003|07-06-04      3#06 10 16 17 25|02 04|00011|00|074|06|004|07-06-06   2  3#01 09 19 20 30|02 11|11100|01|079|13|005|07-06-09   2  3 
Analyse_DLT_LINE =2

[Command]
cmd1="1.前区两个号"
cmd1_SQL1="select "
cmd1_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd1_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd1_SQL4="from dlt "
cmd1_SQL5="where h1=3 and h2=6 order by qs"

cmd2="2.H3 大于29"
cmd2_SQL1="select "
cmd2_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd2_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd2_SQL4="from dlt "
cmd2_SQL5="where h3>=29 order by qs"

cmd3="3.H3 大于30"
cmd3_SQL1="select "
cmd3_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd3_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd3_SQL4="from dlt "
cmd3_SQL5="where h3>=30 order by qs"

cmd4="4.大乐透"
cmd4_SQL1="select format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#')+''+format(l1,'|0#'),format(l2,'0#')+"
cmd4_SQL2="'|'+RIGHT(str(h1 mod 2),1)+RIGHT(str(h2 mod 2),1)+RIGHT(str(h3 mod 2),1)+RIGHT(str(h4 mod 2),1)+RIGHT(str(h5 mod 2),1)+'|'+RIGHT(str(l1 mod 2),1)+RIGHT(str(l2 mod 2),1)+"
cmd4_SQL3="'|'+format(h1+h2+h3+h4+h5,'0##')+'|'+format(l1+l2,'0#')+'|'+right(qs,3)+'|'+format(rq,'mm-dd') from dlt "
cmd4_SQL4="where rq>=#11/1/2005#" 
cmd4_SQL5="order by qs"

cmd5="5.小于某天"
cmd5_SQL1="select "
cmd5_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd5_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd5_SQL4="from dlt "
cmd5_SQL5="where rq<=#12/1/2011# order by qs"

cmd6="6.在某天范围内"
cmd6_SQL1="select  format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd6_SQL2="format(rq,'yy-mm-dd'),'|'+right(qs,3) from dlt "
cmd6_SQL3="where rq>=#12/1/2011# and "
cmd6_SQL4="rq<=#12/31/2011# order by qs"

cmd7="7.红球全部偶数"
cmd7_SQL1="select "
cmd7_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd7_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd7_SQL4="from dlt "
cmd7_SQL5="where h1 mod 2=0 and h2 mod 2=0 and h3 mod 2=0 and h4 mod 2=0 and h5 mod 2=0 order by qs"

cmd8="8.红球全部奇数"
cmd8_SQL1="select "
cmd8_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd8_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd8_SQL4="from dlt "
cmd8_SQL5="where h1 mod 2=1 and h2 mod 2=1 and h3 mod 2=1 and h4 mod 2=1 and h5 mod 2=1 order by qs"

cmd9="9.h1+1=h2 H3>=29"
cmd9_SQL1="select "
cmd9_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd9_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd9_SQL4="from dlt "
cmd9_SQL5="where h1 + 1 = h2 and  H3>=29 order by qs"

cmd10="10.h1+2=h2 H3>=29"
cmd10_SQL1="select "
cmd10_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd10_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd10_SQL4="from dlt "
cmd10_SQL5="where h1 + 2 = h2 and H3>=29 order by qs"

cmd11="11.h1+3=h2 H3>=29"
cmd11_SQL1="select "
cmd11_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd11_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd11_SQL4="from dlt "
cmd11_SQL5="where h1 + 3 = h2 and H3>=29 order by qs"

cmd12="12.h1+4=h2 H3>=29"
cmd12_SQL1="select "
cmd12_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd12_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd12_SQL4="from dlt "
cmd12_SQL5="where h1 + 4 = h2 and H3>=29 order by qs"

cmd13="13.h1+5=h2 H3>=29"
cmd13_SQL1="select "
cmd13_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd13_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd13_SQL4="from dlt "
cmd13_SQL5="where h1 + 5 = h2 and H3>=29 order by qs"

cmd15="15.后区统计"
cmd15_SQL1="select"
cmd15_SQL2="RIGHT(str(l1),2)+' '+RIGHT(str(l2),2) as HQ,"
cmd15_SQL3="format(COUNT(RIGHT(str(l1),2)+' '+RIGHT(str(l2),2)),'0#') as CC"
cmd15_SQL4="from dlt "
cmd15_SQL5="group by RIGHT(str(l1),2)+' '+RIGHT(str(l2),2)"

cmd16="16.指定后区"
cmd16_SQL1="select "
cmd16_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd16_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd16_SQL4="from dlt "
cmd16_SQL5="where l1 in(7) and l2 in(12) order by qs"

cmd22="22.所有记录 红球排序"
cmd22_SQL1="select "
cmd22_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#')+''+format(l1,'|0#'),format(l2,'0#')+"
cmd22_SQL3="'|'+RIGHT(str(h1 mod 2),1)+RIGHT(str(h2 mod 2),1)+RIGHT(str(h3 mod 2),1)+RIGHT(str(h4 mod 2),1)+RIGHT(str(h5 mod 2),1)+'|'+RIGHT(str(l1 mod 2),1)+RIGHT(str(l2 mod 2),1)+"
cmd22_SQL4="'|'+format(h1+h2+h3+h4+h5,'0##')+'|'+"
cmd22_SQL5="format(l1+l2,'0#')+'|'+right(qs,3)+'|'+format(rq,'yy-mm-dd') "
cmd22_SQL6="from dlt "
cmd22_SQL7="where rq>=#1/1/2001#"
cmd22_SQL8="order by h1,h2,h3,h4,h5"

cmd23="23.所有记录 篮球排序"
cmd23_SQL1="select format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#')+''+format(l1,'|0#'),format(l2,'0#')+"
cmd23_SQL2="'|'+RIGHT(str(h1 mod 2),1)+RIGHT(str(h2 mod 2),1)+RIGHT(str(h3 mod 2),1)+RIGHT(str(h4 mod 2),1)+RIGHT(str(h5 mod 2),1)+'|'+RIGHT(str(l1 mod 2),1)+RIGHT(str(l2 mod 2),1)+"
cmd23_SQL3="'|'+format(h1+h2+h3+h4+h5,'0##')+'|'+format(l1+l2,'0#')+'|'+right(qs,3)+'|'+format(rq,'yy-mm-dd')  from dlt "
cmd23_SQL4="where rq>=#1/1/2001#"
cmd23_SQL5="order by l1,l2"

cmd24="24.最后30个记录 仅红球 4"
cmd24_SQL1="select top 30" 
cmd24_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#')"
cmd24_SQL4="from dlt "
cmd24_SQL5="order by qs desc"

cmd25="25.最后20个记录 仅红球 34"
cmd25_SQL1="select top 20" 
cmd25_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#')"
cmd25_SQL4="from dlt "
cmd25_SQL5="order by qs desc"

cmd26="26.最后10个记录 仅红球 1"
cmd26_SQL1="select top 10" 
cmd26_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#')"
cmd26_SQL4="from dlt "
cmd26_SQL5="order by qs desc"

cmd27="27.所有红球"
cmd27_SQL1="select" 
cmd27_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#')"
cmd27_SQL4="from dlt "
cmd27_SQL5="order by qs asc"

cmd28="28.最后30个记录 仅蓝球 4"
cmd28_SQL1="select top 30" 
cmd28_SQL2="format(l1,'0#'),format(l2,'0#')"
cmd28_SQL4="from dlt "
cmd28_SQL5="order by qs desc"

cmd29="29.所有蓝球"
cmd29_SQL1="select" 
cmd29_SQL2="format(l1,'0#'),format(l2,'0#')"
cmd29_SQL4="from dlt "
cmd29_SQL5="order by qs asc"

cmd30="30.两个连号 1.2"
cmd30_SQL1="select "
cmd30_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd30_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd30_SQL4="from dlt "
cmd30_SQL5="where (h1+1=h2 or h2+1=h3 or h3+1=h4 or h4+1=h5) and not (h1+1=h2 and h2+1=h3 or h2+1=h3 and h3+1=h4 or h3+1=h4 and h4+1=h5)"
cmd30_SQL6="order by qs"

cmd31="31.三个连号 1.2.3"
cmd31_SQL1="select "
cmd31_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd31_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3)"
cmd31_SQL4="from dlt "
cmd31_SQL5="where (h1+1=h2 and h2+1=h3 or h2+1=h3 and h3+1=h4 or h3+1=h4 and h4+1=h5) and not (h1+1=h2 and h2+1=h3 and h3+1=h4 or h2+1=h3 and h3+1=h4 and h4+1=h5) "
cmd31_SQL6="order by qs"

cmd32="32.四个连号 1.2.3.4"
cmd32_SQL1="select "
cmd32_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd32_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3) from dlt "
cmd32_SQL4="where h1+1=h2 and h2+1=h3 and h3+1=h4 or h2+1=h3 and h3+1=h4 and h4+1=h5 "
cmd32_SQL5="order by qs"

cmd33="33.两个隔号 1.3"
cmd33_SQL1="select "
cmd33_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd33_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3) from dlt "
cmd33_SQL4="where (h1+2=h2 or h2+2=h3 or h3+2=h4 or h4+2=h5)"
cmd33_SQL5="order by qs"

cmd34="34.三个隔号 1.3.5"
cmd34_SQL1="select "
cmd34_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd34_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3) from dlt "
cmd34_SQL4="where (h1+2=h2 and h2+2=h3 or h2+2=h3 and h3+2=h4 or h3+2=h4 and h4+2=h5)"
cmd34_SQL5="order by qs"

cmd35="35.四个隔号 1.3.5.7"
cmd35_SQL1="select "
cmd35_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd35_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3) from dlt "
cmd35_SQL4="where (h1+2=h2 and h2+2=h3 and h3+2=h4 or h2+2=h3 and h3+2=h4 and h4+2=h5)"
cmd35_SQL5="order by qs"

cmd36="36.两个双隔号 1.4"
cmd36_SQL1="select "
cmd36_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd36_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3) from dlt "
cmd36_SQL4="where (h1+3=h2 or h2+3=h3 or h3+3=h4 or h4+3=h5)"
cmd36_SQL5="order by qs"

cmd37="37.三个双隔号 1.4.7"
cmd37_SQL1="select "
cmd37_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd37_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3) from dlt "
cmd37_SQL4="where (h1+3=h2 and h2+3=h3 or h2+3=h3 and h3+3=h4 or h3+3=h4 and h4+3=h5)"
cmd37_SQL5="order by qs"

cmd38="38.四个双隔号 1.4.7.10"
cmd38_SQL1="select "
cmd38_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(l1,'|0#'),format(l2,'0#|'),"
cmd38_SQL3="format(rq,'yy-mm-dd'),'|'+right(qs,3) from dlt "
cmd38_SQL4="where (h1+3=h2 and h2+3=h3 and h3+3=h4 or h2+3=h3 and h3+3=h4 and h4+3=h5)"
cmd38_SQL5="order by qs"

cmd39="39.双色球"
cmd39_SQL1="select "
cmd39_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(h6,'0#'),format(l1,'0#'),"
cmd39_SQL3="format(rq,'|yyyy-mm-dd'),'|'+right(qs,7)"
cmd39_SQL4="from ssq "
cmd39_SQL5="where h1>=1 order by qs"

cmd40="40.SSQ 三连号 1.2.3"
cmd40_SQL1="select "
cmd40_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(h6,'0#'),format(l1,'0#'),"
cmd40_SQL3="format(rq,'|yyyy-mm-dd'),'|'+right(qs,7) "
cmd40_SQL4="from ssq "
cmd40_SQL5="where (h1+1=h2 and h2+1=h3 or h2+1=h3 and h3+1=h4 or h3+1=h4 and h4+1=h5 or h4+1=h5 and h5+1=h6) and "
cmd40_SQL6="not (h1+1=h2 and h2+1=h3 and h3+1=h4 or h2+1=h3 and h3+1=h4 and h4+1=h5 or h3+1=h4 and h4+1=h5 and h5+1=h6) "
cmd40_SQL7="order by qs"

cmd41="41.SSQ 四连号 1.2.3.4"
cmd41_SQL1="select "
cmd41_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(h6,'0#'),format(l1,'0#'),"
cmd41_SQL3="format(rq,'|yyyy-mm-dd'),'|'+right(qs,7) "
cmd41_SQL4="from ssq "
cmd41_SQL5="where h1+1=h2 and h2+1=h3 and h3+1=h4 or h2+1=h3 and h3+1=h4 and h4+1=h5 or h3+1=h4 and h4+1=h5 and h5+1=h6 "
cmd41_SQL6="order by qs"

cmd42="42.SSQ 三个隔号 1.3.5"
cmd42_SQL1="select "
cmd42_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(h6,'0#'),format(l1,'0#'),"
cmd42_SQL3="format(rq,'|yyyy-mm-dd'),'|'+right(qs,7) "
cmd42_SQL4="from ssq "
cmd42_SQL5="where (h1+2=h2 and h2+2=h3 or h2+2=h3 and h3+2=h4 or h3+2=h4 and h4+2=h5 or h4+2=h5 and h5+2=h6)"
cmd42_SQL6="order by qs"

cmd43="43.SSQ 四个隔号 1.3.5.7"
cmd43_SQL1="select "
cmd43_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(h6,'0#'),format(l1,'0#'),"
cmd43_SQL3="format(rq,'|yyyy-mm-dd'),'|'+right(qs,7) "
cmd43_SQL4="from ssq "
cmd43_SQL5="where (h1+2=h2 and h2+2=h3 and h3+2=h4 or h2+2=h3 and h3+2=h4 and h4+2=h5 or h3+2=h4 and h4+2=h5 and h5+2=h6)"
cmd43_SQL6="order by qs"

cmd51="51.3D"
cmd51_SQL1="select "
cmd51_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),"
cmd51_SQL3="format(rq,'|yyyy-mm-dd'),'|'+right(qs,7)"
cmd51_SQL4="from 3d "
cmd51_SQL5="where h1>=0 order by qs"

cmd53="53.3D 统计"
cmd53_SQL1="select h1,h2,h3,count(h1+h2+h3)" 
cmd53_SQL2="from 3d "
cmd53_SQL3="where rq>=#11/1/2000#"
cmd53_SQL4="group by h1,h2,h3 "
cmd53_SQL5="order by count(h1+h2+h3) desc"

cmd60="60.排列5"
cmd60_SQL1="select "
cmd60_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(rq,'|yyyy-mm-dd'),'|'+right(qs,7)"
cmd60_SQL3="from p5 "
cmd60_SQL4="where h1>=0 and h2>=0 and h3>=0 order by qs"

cmd61="61.排列3"
cmd61_SQL1="select "
cmd61_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),"
cmd61_SQL3="format(rq,'|yyyy-mm-dd'),'|'+right(qs,7)"
cmd61_SQL4="from p3 "
cmd61_SQL5="where h1>=0 order by qs"

cmd70="70.七星彩"
cmd70_SQL1="select "
cmd70_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(h6,'0#'),format(h7,'0#'),format(rq,'|yyyy-mm-dd'),'|'+right(qs,7)"
cmd70_SQL3="from 7xc "
cmd70_SQL4="where h1>=0 order by qs"

cmd80="80.七乐彩"
cmd80_SQL1="select "
cmd80_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#'),format(h6,'0#'),format(h7,'0#'),format(l1,'0#'),format(rq,'|yyyy-mm-dd'),'|'+right(qs,7)"
cmd80_SQL3="from 7lc "
cmd80_SQL4="where h1>=0 order by qs"

cmd90="90.22选5"
cmd90_SQL1="select "
cmd90_SQL2="format(h1,'0#'),format(h2,'0#'),format(h3,'0#'),format(h4,'0#'),format(h5,'0#')"
cmd90_SQL3="from t22x5 "
cmd90_SQL4="where h1>=0 order by qs"

