From 548bb8f71f595ecffb9ab7233f4a2fe709093abb Mon Sep 17 00:00:00 2001
From: xing <xingjs@qq.com>
Date: 星期二, 28 二月 2023 11:52:40 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 data/update.sql |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/data/update.sql b/data/update.sql
index af140c1..cb81795 100644
--- a/data/update.sql
+++ b/data/update.sql
@@ -269,6 +269,23 @@
 group by name
 order by name;
 -- select * from lf.sys_meta where dircode similar to fn_dir_similar('鍩虹娴嬬粯');
+
+-- 鍗曚釜椤圭洰鐨勪笅杞戒釜鏁般�佷笅杞芥鏁板拰鏁版嵁鎬婚噺
+select count(*) "涓嬭浇涓暟", sum(c.dcount) "涓嬭浇鏁伴噺", round(sum(c.dcount * c.sizes)::numeric, 3) "鏁伴噺鎬婚噺(MB)"
+from lf.sys_meta a inner join lf.sys_meta_down b on a.id = b.metaid
+  inner join lf.sys_download c on b.downid = c.id
+where dircode like '06%';
+
+-- 鎸夌収杈撻�佷粙璐ㄧ粺璁�
+select 
+  case medium when 'CPY' then '鎴愬搧娌�' when 'TRQ' then '澶╃劧姘�' when 'YY' then '鍘熸补' else '鍏跺畠' end "杈撻�佷粙璐�",
+  round(sum(st_length(geom))::numeric, 2) "鎬婚噷绋�",
+  count(*) "绠¢亾鏁伴噺",
+  (select count(*) from bs.m_sitepoint b inner join bs.m_pipeline c on b.pipename = c.pipename where c.medium = a.medium) "绔欏満鏁伴噺",
+  (select count(*) from bs.m_valvehousepoint d inner join bs.m_pipeline e on d.pipename = e.pipename where e.medium = a.medium) "闃�瀹ゆ暟閲�"
+from bs.m_pipeline a
+group by medium;
+-- select * from lf.sys_domain where dom_name='dsg0016';
 --------------------------------------------------------- 
 select (select string_agg(code, ',') from lf.sys_dir where name = a.name) "key", name "value"
 from lf.sys_dir a
@@ -298,6 +315,23 @@
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 select a.*, fn_tab_count(a.ns, a.tab, '1=1') "rows" from
 (select distinct ns,tab,fn_get_entity(tab) entity,tab_desc,tableType from lf.sys_dict
 order by tab

--
Gitblit v1.9.3