0
これらの2つのSQLクエリを1つのクエリでマージするにはどうすればよいですか?merge 2 sqlクエリの場所と平均評価
$query2 ="select raiting.rated_user,avg(raiting.rate) as `avg_rating` from raiting,users where
raiting.rated_user=user_id group by raiting.rated_user order by avg(raiting.rate) desc";
$query = “SELECT `user_id`,`name`,`email`,`degree`,`avatar`,`mobile`,`sex`,`nationality`,`nationalitycode`,`birthday_year`,`pr_hour`,`spicality`,`city`,`online`,`intro`, (SQRT(POW((lat - $lat), 2) + POW((lang - $lang), 2)) * $multiplier) AS distance FROM users WHERE POW((lat - $lat), 2) + POW((lang - $lang), 2) < POW(($distance/$multiplier), 2) ORDER BY distance";
MySQLまたはSQL Server? – Sami
ごめんなさいMySQLのクエリ – user3676648