Skip to content
Advertisement

PostgreSQL Query GROUP BY Year/Month – No function matches the given name?

I’m working to write a PostgreSQL query that shows the number of new user signups create by month going back to the start of time in the database. Here’s what I have:

My goal is to have an output similar to:

Problem is I’m getting the following error:

How can I get this query working?

Advertisement

Answer

In Postgres, use date_trunc():

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement