Skip to content
Advertisement

Name of customers who are of legal age (18 years) Postgresql

I have a question about how to return only customers over 18 years old. I’m just getting back from the customers

Advertisement

Answer

If you want to filter the rows, use a where clause. If you want to filter by age, you can use date comparisons:

Note that phrasing the condition this way makes it friendlier to indexes.

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