postgresql取 一個月每天的的數據,沒有數據 補0

數據庫存的數據: select to_char ( start_time, ‘YYYY-MM-DD’ ) AS starttime, 「count」(*) from warn_content GROUP BY start_time 這裏先要創建一個所有時間格式的 中間表 :通過函數 generate_series () SELECT to_char ( b, ‘YYYY-MM-DD’ ) AS t
相關文章
相關標籤/搜索