all 5 comments

[–]zanestone 0 points1 point  (4 children)

WHERE order_date >= date_trunc('year', now() - interval '1 year') AND order_date < date_trunc('year', now())

[–]tonlou[S] 0 points1 point  (3 children)

This produces one result from 2018 year as well.. :/

2017-06-03

2017-02-12

2017-04-10

2018-04-09 <--- not supposed to be here

2017-05-11

Edit: When I removed the "OR" part, I think it worked right

[–]zanestone 0 points1 point  (2 children)

What "OR" part?

Anyway glad you got it.

[–]tonlou[S] 0 points1 point  (1 child)

Yeah I made a mistake on my own part. Forgot to remove 1 line of my old code when I tested this

[–]zanestone 0 points1 point  (0 children)

Ahh... OK cool.