CAD库中统计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_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

时间: 2024-12-25 23:28:46

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

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

select decode(fb.tupr,null,'仅航路',decode(fc.aw,null,'仅终端区','航路及终端区')) 范围,pt 五字代码点,fb.tupr 终端区图及程序,fc.aw 航路 from ( select  distinct wz pt from ( select wz,tupr,0 from (select f2.code_fix_point wz,min(f1.tu) tupr from ( select sid_id id, substr(upper(de

查询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,nvl(    (select f3.significant_point_id from airway_point f3     where f3.code_id=f1.code_fix_point     and f3.code_icao=f2.code_icao     and f3.origin_

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

编译自:http://ask.xmodulo.com/number-of-threads-process-linux.html作者: Dan Nanni原创:LCTT https://linux.cn/article-6240-1.html译者: strugglingyouth本文地址:https://linux.cn/article-6240-1.html 2015-9-17 10:29    收藏: 5 问题: 我正在运行一个程序,它在运行时会派生出多个线程.我想知道程序在运行时会有多少线程

Mongo查询list数组中一个字段大于特定条数

由于刚刚接触mongodb,很多语法还不是很了解,写的不好的地方请大佬指出 查询的demo数据 { "_id":Object("xxxxxxxx"), "contentList":[ "id":"xxxx", "type":2 ], [ "id":"xxxx", "type":2 ] } 查询方法,使用聚合aggregate查询

SQLSERVER中统计所有表的记录数

利用系统索引表sysindexes中索引ID indid<1的行中的rows列存有该表的行数这一特点.    最后一种方法是利用隐藏未公开的系统存储过程sp_MSforeachtable CREATE TABLE #temp (TableName VARCHAR (255), RowCnt INT) EXEC sp_MSforeachtable 'INSERT INTO #temp SELECT ''?'', COUNT(*) FROM ?' SELECT TableName, RowCnt F

ORACLE,SQLSERVER等数据库如何获取某张表中相同字段最近一条数

SELECT * FROM ( SELECT JBXX.*,row_number() OVER (partition BY WRYMC ORDER BY WRYMC,CJSJ DESC) R FROM T_WRY_JBXX  JBXX ) A WHERE R=1

两种方式 获取数据库某个表中所有的数据数量条数

public int getAllEmps(){        //第一种方式 纯JDBC方式//        Connection conn=null;//        PreparedStatement ps=null;//        ResultSet rs=null;//        try {//            conn=C3Pool.getConnection();//            String sql="select count(*) from emp&

sql查询数据库中所有表的记录条数,以及占用磁盘空间大小。

1 SELECT 2 TableName = obj.name, 3 TotalRows = prt.rows, 4 [SpaceUsed(KB)] = SUM(alloc.used_pages)*8 5 FROM sys.objects obj 6 JOIN sys.indexes idx on obj.object_id = idx.object_id 7 JOIN sys.partitions prt on obj.object_id = prt.object_id 8 JOIN sys.

统计日志的不同条数

import collections import itertools import multiprocessing import bz2 class MapReduce(object): def __init__(self,map_func,reduce_func,num_workers=None): self.map_func = map_func self.reduce_func = reduce_func self.pool = multiprocessing.Pool(num_work