Timestamp Difference - Syntax Error - Condtitional Selects
SELECT name, admin, reason, unban, FROM_UNIXTIME(date, '%Y-%m-%d') AS datetime, 
HOUR(x.difference) AS HRemain, MINUTE(x.difference) AS MRemain 
FROM(SELECT SEC_TO_TIME(AVG(TIMESTAMPDIFF(MINUTE, unban, NOW()))) AS difference FROM banned) AS x, banned 
WHERE name LIKE 'Yashas' 


Solved it myself. Just had to get a textbook and study.

EDIT: Server returns datetime as NULL for some reason.