• forex sql


    select 
      max(point) max
      ,min(point) min
      ,(max(point) -min(point) ) diss
      ,'0'||substr((max(point) -min(point) ),0,5) diss2
      ,datetime
      ,to_char(to_date(datetime,'yyyy-mm-dd'),'day') day
    from (
       select t.point ,to_char(t.datatime,'yyyy-MM-dd') datetime 
       from mk_eurusd t 
    ) tt 
    group by datetime 
    order by datetime desc;
     
     
    -------------------------------------------------------------------------

    select
    max(ta.c1) max,
    min(ta.c1) min,
    ( max(ta.c1)-min(ta.c1)) diss,
    to_char(ta.datetime,'yyyy-MM-dd') datetime
    from (
    select tt1.datetime,tt1.day,tt1.c1 from (
    select to_date(tt.datetime,'yyyy-MM-dd HH24:Mi:ss') datetime,
    to_char(to_date(tt.datetime,'yyyy-MM-dd HH24:Mi:ss'),'day') day,tt.c1,tt.c2,tt.c3,tt.c4,tt.c5 from (
    select t.c01 ||' '|| t.c02 datetime,t.c1,t.c2,t.c3,t.c4,t.c5 from f_gbpjpy t
    ) tt
    ) tt1
    ) ta group by to_char(ta.datetime,'yyyy-MM-dd');

    -------------------------------------------------------------------------

  • 相关阅读:
    MySQL全文索引--转载
    提升接口tps
    数据库连接池了解和常用连接池对比
    SpringBoot跨域配置,解决跨域上传文件
    oss上传
    MySQL高级 之 explain
    spring cloud集群负载均衡
    Xmind日常操作
    产品经理应该懂点经济学
    初谈产品
  • 原文地址:https://www.cnblogs.com/adolfmc/p/2730432.html
Copyright © 2020-2023  润新知