Q&A about the site for legal professionals, students, and others with experience or interest in law
with last_comment as ( select postid, text, max(creationdate) creationdate from comments where postid=39809257 group by postid, text) select first_value(text) over (partition by postid order by creationdate desc) from comments where postid=39809257