gpt4 book ai didi

php - 获取匹配记录数

转载 作者:可可西里 更新时间:2023-11-01 08:29:26 26 4
gpt4 key购买 nike

我有两个名为 question_answersquestion_attempts 的表。

question_answers 具有每个问题的列名称 answer 的选项和 question_attempts 具有列名称 responsesummary 的所有尝试答案。现在我想获取匹配记录的数量。

“问题_答案”enter image description here“question_attempts”enter image description here

最佳答案

这些 SQL 可用于获取两个表中匹配记录的计数。

select count(*) from question_answers as  table_1 join question_attempts 
on table_1.uniquecolumn_table1 = table_2.uniquecolumn_table2

谢谢。

关于php - 获取匹配记录数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30908333/

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