Postgresql – COUNT with WHERE condition doesn't return all rows
I'm writing a solution for a DataLemur SQL question and I almost had it right but there is one row missing. I have written this query myself: WITH CTE AS ( SELECT user_id, transaction_date, DENSE_RANK() OVER (PARTITION BY user_id order…