I am using postgresql. There is a timestamp type column and an id column.
I want to extract it like this.
select date, count(distinct(id)) from table group by date
How do I get the date when I want to use query like?
postgresql
It's a self-answer.
column_name::timestamp::date
That's how it works. Instead of columnn_name, you can put the column name in the timestamp format.
© 2024 OneMinuteCode. All rights reserved.