Q&A for linguists, teachers, students and Spanish language enthusiasts in general wanting to discuss the finer points of the language
select p.id , year(p.creationdate) as creationdateyear , case when u.upvotes is null then 0 else u.upvotes end as upvotes from posts p left join( select postid, count(votetypeid) as upvotes from postfeedback where votetypeid = 2 group by postid ) u on u.postid = p.id where p.id = 231855