SELECT * FROM (`uchome_space` AS `a` LEFT JOIN `uchome_spacefield` AS `b` on `a`.`uid`=`b`.`uid`) LEFT JOIN `uchome_session` as `c` on `a`.`uid`=`c`.`uid` WHERE `a`.`namestatus`='1' AND (resideprovince='重庆' or birthprovince ='重庆' ) AND `a`.`avatar`='1' ORDER BY `c`.`lastactivity` DESC