select ask.id "id",ask.createTime "createTime",ask.publisherID "publisherID",users.nickname "nickname",
users.icon "icon",users.gender "gender",ask.reward "reward",ask.zan "zan",ask.commentID "commentID",
ask.typee "type",ask.label "label",ask.content "content",ask.image "image",count(comment.id) "commentCount"
from ask inner join users on ask.publisherID=users.id 
left outer join comment on comment.objectID = ask.id 
group by ask.id,users.nickname,users.icon,users.gender
order by "createTime" desc
limit 10 offset 0;

postgresql默认全部小写,若要区分字段名大小写需要用引号括住

相关文章:

  • 2022-01-20
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2021-11-15
  • 2021-11-10
  • 2021-10-17
  • 2022-01-23
猜你喜欢
  • 2022-12-23
  • 2021-06-15
  • 2021-11-14
  • 2022-12-23
  • 2022-01-24
  • 2021-06-19
  • 2021-12-27
相关资源
相似解决方案