SELECT a.time,COALESCE(b.counts,0) as counts from
(
SELECT
to_char ( b, 'YYYY-MM-DD' ) AS time
FROM
generate_series ( to_timestamp ( '2024-06-01', 'YYYY-MM-DD hh24:mi:ss' ), to_timestamp ( '2024-06-30', 'YYYY-MM-DD hh24:mi:ss' ), '1 days' ) AS b
GROUP BY
time ORDER BY time asc) as aFULL OUTER JOIN(
select to_char(to_timestamp(create_time/1000)::TIMESTAMP, 'YYYY-MM-DD' ) AS starttime, count(*) as counts from t_work_order GROUP BY starttime
) as b
on a.time=b.starttime
WHERE time is not null
order by a.time asc
2.按照月
SELECT a.time,COALESCE(b.counts,0) as counts from
(
SELECT
to_char ( b, 'YYYY-MM' ) AS time
FROM
generate_series ( to_timestamp ( '2024-01-01', 'YYYY-MM' ), to_timestamp ( '2024-06-30', 'YYYY-MM' ), '1 months' ) AS b
GROUP BY
time ORDER BY time asc) as aFULL OUTER JOIN(
select to_char(to_timestamp(create_time/1000)::TIMESTAMP, 'YYYY-MM' ) AS starttime, count(*) as counts from t_work_order GROUP BY starttime
) as b
on a.time=b.starttime
WHERE time is not null
order by a.time asc
3.按照年
SELECT a.time,COALESCE(b.counts,0) as counts from
(
SELECT
to_char ( b, 'YYYY' ) AS time
FROM
generate_series ( to_timestamp ( '2022-01-01', 'YYYY' ), to_timestamp ( '2024-06-30', 'YYYY' ), '1 years' ) AS b
GROUP BY
time ORDER BY time asc) as aFULL OUTER JOIN(
select to_char(to_timestamp(create_time/1000)::TIMESTAMP, 'YYYY' ) AS starttime, count(*) as counts from t_work_order GROUP BY starttime
) as b
on a.time=b.starttime
order by a.time asc
1.信息收集
(1)判断域控
shell net time /domain shell ping OWA2010CN-God.god.org (2)主机探测
浏览探测->网络探测
主机列表显示: (3)域用户收集: shell net user /domain…