SQL Error: Unknown column 'city_id' in 'from clause' at /var/www/svem/data/www/svem.ru/lib/Site/Users.php line 311
SELECT * FROM (SELECT 
    			lc.city_id,
    			lc.name,
    			COUNT(lc.city_id) as `count`,
    			la.name as area_name,
    			la.region_id as area_id
    		FROM user AS u
    		LEFT JOIN loc__city AS lc USING (city_id)
    		LEFT JOIN loc__region AS la ON (lc.region_id = la.region_id)
    		WHERE u.user_id IN (SELECT user_id FROM rating)
			GROUP BY lc.city_id
    		ORDER BY la.name, lc.name
    		LIMIT 200000) AS t
    		
    		-- ORDER BY name ASC