gpt4 book ai didi

mysql - 在 MySQL 中选择两个表

转载 作者:行者123 更新时间:2023-11-29 08:08:30 25 4
gpt4 key购买 nike

我有两张 table hitsposts 。在 hits我有表id_post,hitsposts我有表id,title

我需要构建包含所有具有相关点击率和按点击率排序的帖子的报告。谁能帮我选择一下吗?

最佳答案

SELECT   posts.id as id, posts.title as title, hits.hits as hitsdate
FROM posts INNER JOIN hits ON hits.id_post = posts.id
ORDER BY hits.hits

关于mysql - 在 MySQL 中选择两个表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22224271/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com