id name absence_count ----------- ---------- ------------- 1 John 2Hope this helps, Oleg
where date_part('day', [date] - PrevDate) = 1 and date_part('day', PrevDate - BeforePrevDate) = 1The above should work fine because there is no time part in the date values. Please let me know. I will post another comment in the comments section under your question regarding what you posted for clarification.
18 People are following this question.