Changed blog SQL to reflect postgres syntax