So I've gotten it to work sort of
SELECT `number` , `school` , `date` , `text` , `category` , `likes` , `dislikes` , `md5` , `banned` , b.CommentCount , `name` , `title`, m.last_date
FROM main a
LEFT OUTER JOIN (
SELECT replyto, COUNT( `text` ) AS CommentCount
FROM `comments`
GROUP BY reply_to
)
b ON `number` = b.reply_to
left outer JOIN (
select reply_to, max(`date`) AS last_date
from `comments`
GROUP BY reply_to)
m on `number` = m.reply_to
NATURAL JOIN college_list
WHERE school = 21
ORDER BY last_date
This works, but I get null fields and it messes with the sorting... I've tried a max(ifnull(`date`,[date from post] )) but I don't know how to call the date of the post. So is there there a way to do Order by maximum(last_date,date) ??