Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How to do coalesce on aggregation? #293
I want to annotate results with the last time a page was displayed and then sort in descendant order. Unfortunately when there is no such date I get None which messes the order by juping in front.
coalesce(max(i.created), datetime(1970, 1, 1))
max(i.created if i.created is not None else datetime(1970, 1, 1))
Also, I'm not sure the query is logically correct. When you use aggregation, you need to have some grouping, and it is not clear to me what you want to place to