I'm not sure how to do the last part of my query, which is doing calculations directly with the aliases: (SUM(task_avg - minutes) AS difference. I don't think I can do it as easy as I'd like, but can't find a means to do it.
$result = mysql_query("SELECT U.user_name, SUM(TA.task_average*M.minutes) AS task_avg, SUM(M.minutes) AS minutes, SUM(task_avg-minutes) AS difference
FROM summary S
JOIN users U ON U.user_id = S.user_id
JOIN tasks TA ON TA.task_id = S.task_id
JOIN minutes M ON M.minutes_id = S.minutes_id
GROUP BY U.user_name
LIMIT 0 , 30");

task_avgandminutes, I believe you can just do the operations all in one, without the two aliases, to get the difference...SUM(SUM(TA.task_average*M.minutes) - SUM(M.minutes)) AS difference– andbeyond Oct 19 '12 at 0:53task_avgandminutes; you can still use the method as mentioned by @andbeyond – hjpotter92 Oct 19 '12 at 0:56differencecalculation) in anotherSELECTstatement that selectstask_avgandminutes, then do yourdifferencecalculation in the wrapped query – andbeyond Oct 19 '12 at 0:56