MySQL median subquery in select

This is what I have at the moment: http://sqlfiddle.com/#!9/30a97c/10 Schema: CREATE TABLE IF NOT EXISTS `test` ( `t_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `t_city` varchar(64) NOT NULL, `…