我有两张 table hits
和posts
。在 hits
我有表id_post,hits
和 posts
我有表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/