From 0eb8ecf506e209610ad525a3be9ef2edabf4502c Mon Sep 17 00:00:00 2001 From: Fortern Date: Wed, 28 Jan 2026 06:32:31 +0800 Subject: [PATCH] prism --- PostgreSQL/prism/prism.sql | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/PostgreSQL/prism/prism.sql b/PostgreSQL/prism/prism.sql index 76e9a12..37e537d 100644 --- a/PostgreSQL/prism/prism.sql +++ b/PostgreSQL/prism/prism.sql @@ -1,9 +1,5 @@ --- 获取最新的数据 -select to_timestamp(max(timestamp)) -from activities; - --- 获取最旧的数据 -select to_timestamp(min(timestamp)) +-- 获取最旧于最新的数据 +select to_timestamp(min(timestamp)) as min, to_timestamp(max(timestamp)) as max from activities; -- 最大与最小id