查询 PostgreSQL 数据库中的今天、昨天和一个月内的数据
要���询 PostgreSQL 数据库中的今天、昨天和一个月内的数据,你可以使用以下 SQL 查询语句作为参考:
()- 查询今天的数据:
SELECT * FROM your_table WHERE your_date_column >= current_date AND your_date_column
- 查询昨天的数据:
SELECT * FROM your_table WHERE your_date_column >= current_date - 1 AND your_date_column
- 查询一个月内的数据:
SELECT * FROM your_table WHERE your_date_column >= current_date - interval '1 month' AND your_date_column
The End