您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

如何编写此SQL子查询?

如何编写此SQL子查询?

只需放置子查询,您将得到结果:

`SELECT foodjoint_id,foodjoint_name,open_hours,cont_no,address_line,city ( 3959 * acos( cos( radians('".$userLatitude."') ) * cos( radians( foodjoint_latitude) ) * cos( radians( foodjoint_longitude) - radians('".$userLongitude."') ) + sin( radians('".$userLatitude."') ) * sin( radians( foodjoint_latitude) ) ) ) AS distance,

(select AVG(customer_ratings) from customer_review where customer_review.foodjoint_id=provider_food_joints.foodjoint_id) as Customer_Reviews

 FROM provider_food_joints

HAVING distance < '3' ORDER BY distance LIMIT 0 , 20`
SQLServer 2022/1/1 18:43:15 有527人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶