gpt4 book ai didi

mysql - 查询 mysql - 结果意外

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

SELECT results.data_scrap AS data_badania,
tests.data_test AS data_badania2,
results.words_count_out_a AS liczba_slow,
results.position AS pozycja
FROM results,
tests,
keywords
WHERE results.keyword=test
AND tests.id=1
ORDER BY results.position

我收到了这个查询,我不知道为什么,但在我的结果中,一行没有重复多次。

SELECT *
FROM results,
tests,
keywords
WHERE results.keyword=test
AND tests.id=1
ORDER BY results.position

结果是 1.1.1.1.1.2.2.2.2.2.3.3.3.3.3 而不是 1.2.3

最佳答案

试试这个:

SELECT DISTINCT *
FROM results,
tests,
keywords
WHERE results.keyword=test
AND tests.id=1
ORDER BY results.position

或者,试试这个:

SELECT *
FROM results,
tests,
keywords
WHERE results.keyword=test
AND tests.id=1
GROUP BY results.position

关于mysql - 查询 mysql - 结果意外,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45144334/

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