select 'PBN运行航路' 类型, fb.b 总条数, fa.a 总距离 from
                (
                select sum(s)  a  from (
                            select distinct f4.airway_point1,f4.airway_point2, f4.kilometer_distance S  from airway f1, airway_segment_point f2,airway_segment_point f3, segment f4
                            where
                            f1.chart_type_id=3 and
                            f1.airway_id =f2.airway_id and
                            f1.airway_id =f3.airway_id and
                            f2.airway_seq=f3.airway_seq-1 and
                            (
                            (f2.airway_point_id =f4.airway_point1 and f3.airway_point_id =f4.airway_point2) or
                            (f2.airway_point_id =f4.airway_point2 and f3.airway_point_id =f4.airway_point1)
                            ) and f1.airway_rnp is not null
                            )  tm
                )  fa
                left join
                (select  count(*) b from airway where airway_rnp is not null and chart_type_id=3 )   fb
                on 1=1

纯PBN代号航路

select 'PBN代号航路' 类型, fb.b 总条数, fa.a 总距离 from
                (
                select sum(s)  a  from (
                            select distinct f4.airway_point1,f4.airway_point2, f4.kilometer_distance S  from airway f1, airway_segment_point f2,airway_segment_point f3, segment f4
                            where
                            f1.chart_type_id=3 and
                            f1.airway_id =f2.airway_id and
                            f1.airway_id =f3.airway_id and
                            f2.airway_seq=f3.airway_seq-1 and
                            (
                            (f2.airway_point_id =f4.airway_point1 and f3.airway_point_id =f4.airway_point2) or
                            (f2.airway_point_id =f4.airway_point2 and f3.airway_point_id =f4.airway_point1)
                            ) and f1.airway_type_id in (2,5,8)
                            )  tm
                )  fa
                left join
                (select  count(*) b from airway where airway_type_id in (2,5,8) and chart_type_id=3 )   fb
                on 1=1

CAD库中统计PBN运行航路条数和总距离的更多相关文章

  1. (转)如何在Linux中统计一个进程的线程数

    如何在Linux中统计一个进程的线程数 原文:http://os.51cto.com/art/201509/491728.htm 我正在运行一个程序,它在运行时会派生出多个线程.我想知道程序在运行时会 ...

  2. SQLSERVER中统计所有表的记录数

    SQLSERVER中统计所有表的记录数 利用系统索引表sysindexes中索引ID indid<1的行中的rows列存有该表的行数这一特点.    方法是利用隐藏未公开的系统存储过程sp_MS ...

  3. PHP查询数据库中满足条件的记录条数(二种实现方法)

    在需要输出网站用户注册数或者插入数据之前判断是否有重复记录时,就需要获取满足条件的MySQL查询的记录数目,接下来介绍两种查询统计方法,感兴趣的朋友可以了解下啊,或许对你有所帮助     在需要输出网 ...

  4. 2015.7.24 CAD库中列举五字代码点所属航路及终端区图,左连接的累加

    select decode(fb.tupr,null,'仅航路',decode(fc.aw,null,'仅终端区','航路及终端区')) 范围,pt 五字代码点,fb.tupr 终端区图及程序,fc. ...

  5. CAD库中列举所有航路点

    select distinct f1.airway_point_name,f1.latitude,f1.longitude,upper(f1.airway_point_type_name)type,f ...

  6. jmeter中一次运行多条sql语句

    操作比较简单,主要就分两步: 第一步:在JDBC Connection Configuration中设置,主要见下图标注部分增加:?allowMultiQueries=true 第二步:在JDBC R ...

  7. MySQL数据库中统计一个库中的所有表的行数?

    今天公司两个远端的数据库主从同步有点问题,查看下wordpress库下所有表的表的条目? mysql> use information_schema;Database changedmysql& ...

  8. 查询cad库中,所有程序leg引用的点的id,需要预先处理点表和程序表

    select f1.pro_id,f1.pro_type, f1.code_fix_point, f1.code_type_fix_point, f1.code_fir,f2.code_icao,nv ...

  9. 如何在 Linux 中统计一个进程的线程数

    编译自:http://ask.xmodulo.com/number-of-threads-process-linux.html作者: Dan Nanni原创:LCTT https://linux.cn ...

随机推荐

  1. 51nod 1503 多线程dp

    http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1503 1503 猪和回文 题目来源: CodeForces 基准时间限制 ...

  2. Java Maven项目使用CXF插件生成WebService代理

    CXF生成代理类插件名称:cxf-codegen-plugin 实现功能: 指定代理类所在的包 生成soapheader 操作: eclipse中run as -> maven build -& ...

  3. LeetCode OJ:Merge Sorted Array(合并排序的数组)

    Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:Yo ...

  4. JavaScript JSON.parse()和JSON.stringify()

    parse用于从一个字符串中解析出json对象,如 var str = '{"name":"huangxiaojian","age":&qu ...

  5. maven install时自动施行单元测试

    maven install时自动执行单元测试 1.maven-surefire-plugin简介 Maven本身并不是一个单元测试框架,它只是在构建执行到特定生命周期阶段的时候,通过插件来执行JUni ...

  6. Dockerfile 模版

    最近一直在用docker,总结了一个靠谱的模版,分享给大家. From ubuntu:14.04 MAINTAINER pidong.li@genetronhealth.com RUN echo de ...

  7. HAWQ取代传统数仓实践(十二)——维度表技术之分段维度

    一.分段维度简介 在客户维度中,最具有分析价值的属性就是各种分类,这些属性的变化范围比较大.对某个个体客户来说,可能的分类属性包括:性别.年龄.民族.职业.收入和状态,例如,新客户.活跃客户.不活跃客 ...

  8. VS for Mac安装之路

    首先说四个字:水土不服 作为宇宙最强IDE,从开始编程就一直用的Visual Studio,最近新买了Mac,发现微软发布了VS for Mac,于是打算安装一个试试,怎奈,微软的产品在别家水土不服, ...

  9. InpOut32 InputTest.cpp hacking

    /************************************************************************************ * InpOut32 Inp ...

  10. HDU - 5936: Difference(暴力:中途相遇法)

    Little Ruins is playing a number game, first he chooses two positive integers yy and KK and calculat ...