CQD
Repos
37
Followers
33
Following
1

Events

Always overide my scripts

git cm 同時支援 master 跟 main

Created at 2 days ago
push

老神網頁版

加上 lang

Created at 5 days ago

加上方便更新歷史資料的 make recipe

Created at 1 week ago

更新歷史資料

Created at 1 week ago

358,614,1198,1976,2671

Update GitHub Pages

Created at 1 week ago

358,614,1198,1976,2671

Created at 1 week ago

Fix return value

Created at 3 weeks ago

加上 GA

Created at 3 weeks ago

加上 OG 資訊

Created at 3 weeks ago

加上 OG 資訊

Created at 3 weeks ago
push

調整網站名稱

Created at 4 weeks ago

天下雜誌專題網頁好像有在更新

今天發現 last updated 寫 2022.08.18。 水情資料原本斷在四月,現在多了七月其中三天的資料。

不過五六月跟八月的資料都還是缺...

總之調整 footer 的描述避免誤會。

Created at 4 weeks ago
closed issue
Use `sumIf()` on field produced by `if()` may return null instead of 0

Describe what's wrong

Use sumIf() on field produced by if() may return null instead of 0.

Does it reproduce on recent release?

Can be reproduced with

  • 22.8.3.13
  • 22.3.6.5

How to reproduce

Result for this query contains null

5a4940cad674 :) WITH
                src AS (SELECT null AS cnt),
                dst AS (SELECT if(cnt IS null, 0, cnt) AS cnt FROM src)
                SELECT sumIf(cnt, cnt > 0), sum(cnt), max(cnt), min(cnt) FROM dst
                
(formatted query omitted)

Query id: 7cd0f8c9-0131-42a7-8ed7-b563f39520cf

┌─sumIf(cnt, greater(cnt, 0))─┬─sum(cnt)─┬─max(cnt)─┬─min(cnt)─┐
│                        ᴺᵁᴸᴸ │        0 │        0 │        0 │
└─────────────────────────────┴──────────┴──────────┴──────────┘

While result for this query is 0

5a4940cad674 :) WITH
                src AS (SELECT 0 AS cnt),
                dst AS (SELECT if(cnt IS null, 0, cnt) AS cnt FROM src)
                SELECT sumIf(cnt, cnt > 0), sum(cnt), max(cnt), min(cnt) FROM dst
                
(formatted query omitted)

Query id: 4661a152-7809-48b6-889f-94366269efd5

┌─sumIf(cnt, greater(cnt, 0))─┬─sum(cnt)─┬─max(cnt)─┬─min(cnt)─┐
│                           0 │        0 │        0 │        0 │
└─────────────────────────────┴──────────┴──────────┴──────────┘

Expected behavior

Result for both queries should be consistent.

Created at 4 weeks ago
issue comment
Use `sumIf()` on field produced by `if()` may return null instead of 0

Understood. Thank you for the clarification!

Created at 4 weeks ago

調整標題

Created at 4 weeks ago
issue comment
Use `sumIf()` on field produced by `if()` may return null instead of 0

Not sure if this is related, but introduce JOIN to the party without any row successfully joined seems to also break other aggregate functions.

5a4940cad674 :) WITH
                src AS (SELECT 0 AS cnt, 'right' AS key),
                lft AS (SELECT  'left' AS key),
                rgt AS (SELECT if(cnt IS null, 0, cnt) AS cnt, key FROM src),
                jjj AS (SELECT * FROM lft JOIN rgt ON lft.key = rgt.key)
                SELECT sumIf(cnt, cnt < 0), sum(cnt), max(cnt), min(cnt) from jjj
                
(formatted query omitted)

Query id: 70b0200e-bc43-47d3-b230-87b6e1736f38

┌─sumIf(cnt, less(cnt, 0))─┬─sum(cnt)─┬─max(cnt)─┬─min(cnt)─┐
│                        0 │        0 │        0 │        0 │
└──────────────────────────┴──────────┴──────────┴──────────┘
5a4940cad674 :) WITH
                src AS (SELECT null AS cnt, 'left' AS key),
                lft AS (SELECT  'left' AS key),
                rgt AS (SELECT if(cnt IS null, 0, cnt) AS cnt, key FROM src),
                jjj AS (SELECT * FROM lft JOIN rgt ON lft.key = rgt.key)
                SELECT sumIf(cnt, cnt < 0), sum(cnt), max(cnt), min(cnt) from jjj
                
(formatted query omitted)

Query id: 3e566ae8-b665-4ab6-a8b8-818cf73fea55

┌─sumIf(cnt, less(cnt, 0))─┬─sum(cnt)─┬─max(cnt)─┬─min(cnt)─┐
│                     ᴺᵁᴸᴸ │        0 │        0 │        0 │
└──────────────────────────┴──────────┴──────────┴──────────┘
5a4940cad674 :) WITH
                src AS (SELECT null AS cnt, 'right' AS key),
                lft AS (SELECT  'left' AS key),
                rgt AS (SELECT if(cnt IS null, 0, cnt) AS cnt, key FROM src),
                jjj AS (SELECT * FROM lft JOIN rgt ON lft.key = rgt.key)
                SELECT sumIf(cnt, cnt < 0), sum(cnt), max(cnt), min(cnt) from jjj
                
(formatted query omitted)

Query id: ef4e9b27-11db-4b06-8b66-0787ac4e6ed3

┌─sumIf(cnt, less(cnt, 0))─┬─sum(cnt)─┬─max(cnt)─┬─min(cnt)─┐
│                     ᴺᵁᴸᴸ │     ᴺᵁᴸᴸ │     ᴺᵁᴸᴸ │     ᴺᵁᴸᴸ │
└──────────────────────────┴──────────┴──────────┴──────────┘```



                                
Created at 4 weeks ago
opened issue
Use `sumIf()` on field produced by `if()` may return null instead of 0

Describe what's wrong

Use sumIf() on field produced by if() may return null instead of 0.

Does it reproduce on recent release?

Can be reproduced with

  • 22.8.3.13
  • 22.3.6.5

How to reproduce

Result for this query contains null

5a4940cad674 :) WITH
                src AS (SELECT null AS cnt),
                dst AS (SELECT if(cnt IS null, 0, cnt) AS cnt FROM src)
                SELECT sumIf(cnt, cnt > 0), sum(cnt), max(cnt), min(cnt) FROM dst
                
(formatted query omitted)

Query id: 7cd0f8c9-0131-42a7-8ed7-b563f39520cf

┌─sumIf(cnt, greater(cnt, 0))─┬─sum(cnt)─┬─max(cnt)─┬─min(cnt)─┐
│                        ᴺᵁᴸᴸ │        0 │        0 │        0 │
└─────────────────────────────┴──────────┴──────────┴──────────┘

While result for this query is 0

5a4940cad674 :) WITH
                src AS (SELECT 0 AS cnt),
                dst AS (SELECT if(cnt IS null, 0, cnt) AS cnt FROM src)
                SELECT sumIf(cnt, cnt > 0), sum(cnt), max(cnt), min(cnt) FROM dst
                
(formatted query omitted)

Query id: 4661a152-7809-48b6-889f-94366269efd5

┌─sumIf(cnt, greater(cnt, 0))─┬─sum(cnt)─┬─max(cnt)─┬─min(cnt)─┐
│                           0 │        0 │        0 │        0 │
└─────────────────────────────┴──────────┴──────────┴──────────┘

Expected behavior

Result for both query should be consistent.

Created at 4 weeks ago

989,2335,2338,2476

Update GitHub Pages

Created at 1 month ago

989,2335,2338,2476

Created at 1 month ago

整理拉新資料的邏輯,讓更新 tsv 紀錄比較簡單

更新歷史紀錄

Created at 1 month ago

標題還是改回歷年統計

原因:三心二意

Created at 1 month ago
push

確保使用 sans-serf 字型

Created at 1 month ago
push

Quadtree 小修小改們...

Created at 1 month ago

明顯標示開始/結束時間

點北中南部連結時網址列要跟著變

Created at 1 month ago
push

quadtree

Created at 1 month ago
push

quadtree

Created at 1 month ago
push

quadtree

Created at 1 month ago
push

調整連結順序

Created at 1 month ago

用 cron job 確保會拉到最新資料

Created at 1 month ago
Created at 1 month ago