源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

一个SQL语句获得某人参与的帖子及在该帖得分总和

  • 时间:2022-07-11 21:59 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:一个SQL语句获得某人参与的帖子及在该帖得分总和
select a.*,b.SumPoint from Expert_Topic_Index a,( select TopicID, Sum(Point) as SumPoint from expert_reply_index where PostUserName = 'ghj1976' Group by TopicID Having Sum(Point) > 0 ) as b where a.TopicID = b.TopicID 这里其实就是把一个查询的结果放到新的一个查询中了。 另外 Having 对分组结果进行的查询。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部