zoukankan      html  css  js  c++  java
  • sql画图

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

    with a as (select distinct round(a.x + b.x) x,round(a.y + b.y) y from
    (select (sum(x) over(order by n)) x,
    round(sum(y) over(order by n)) y
    from (select n, cos(n/30 * 3.1415926)*2 x,
    sin(n/30 * 3.1415926) y
    from (select rownum - 1 n from all_objects where rownum <= 30 +30))) a,
    (select n, (sum(x) over(order by n)) x,
    round(sum(y) over(order by n)) y
    from (select n,
    cos( m /3 * 3.1415926) * 2 * 15 x,
    sin( m /3 * 3.1415926)* 15 y
    from (select case when rownum <= 2 then 3
    when rownum = 3 then -2 else -6 end m, rownum - 1 n
    from all_objects where rownum <= 5))) b
    )
    select replace(sys_connect_by_path(point, '/'), '/', null) star
    from (select b.y, b.x, decode(a.x, null, ' ', '*') point
    from a,
    (select *
    from (select rownum - 1 + (select min(x) from a) x
    from all_objects
    where rownum <= (select max(x) - min(x) + 1 from a)),
    (select rownum - 1 + (select min(y) from a) y
    from all_objects
    where rownum <= (select max(y) - min(y) + 1 from a))) b
    where a.x(+) = b.x
    and a.y(+) = b.y)
    where x = (select max(x) from a)
    start with x = (select min(x) from a)
    connect by y = prior y
    and x = prior x + 1;

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

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

    with a as (
    select distinct round(sum(x) over(order by n)) x,
    round(sum(y) over(order by n)) y
    from (select n,
    cos(trunc(n / 20) * (1-1/5) * 3.1415926) * 2 x,
    sin(trunc(n / 20) * (1-1/5) * 3.1415926) y
    from (select rownum - 1 n from all_objects where rownum <= 20 * 5))
    )

    select replace(sys_connect_by_path(point, '/'), '/', null) star
    from (select b.y, b.x, decode(a.x, null, ' ', '*') point
    from a,
    (select *
    from (select rownum - 1 + (select min(x) from a) x
    from all_objects
    where rownum <= (select max(x) - min(x) + 1 from a)),
    (select rownum - 1 + (select min(y) from a) y
    from all_objects
    where rownum <= (select max(y) - min(y) + 1 from a))) b
    where a.x(+) = b.x
    and a.y(+) = b.y)
    where x = (select max(x) from a)
    start with x = (select min(x) from a)
    connect by y = prior y
    and x = prior x + 1;

  • 相关阅读:
    如何把本地项目上传到Github
    Git使用详细教程
    PhpStorm中报 “Cannot run program git.exe, 系统找不到指定的文件” 
    delete
    CentOS7 vs centos6
    CentOS 七 vs CentOS 6的不同
    内网端口转发方法汇总
    推荐给开发人员的6个实用命令行工具
    从大公司离职去小公司当 CTO 是一种怎样的体验?
    如果要做点对点的视频传输应该一般使用什么协议
  • 原文地址:https://www.cnblogs.com/yy123/p/4079134.html
Copyright © 2011-2022 走看看