sqlite SQL查询where [已关闭]

9rygscc1  于 2022-12-13  发布在  SQLite
关注(0)|答案(2)|浏览(254)

已关闭。此问题需要details or clarity。当前不接受答案。
**想要改进此问题吗?**通过editing this post添加详细信息并阐明问题。

5天前关闭。
Improve this question
我有关于sql查询的问题,我使用select * from where,我想知道如何创建一个SQLitle查询与球队谁赢和可能_赢%。表是简单的。
团队1、团队2、团队1_高尔夫、团队2_高尔夫、团队1_可能、团队2_可能
表数据为:enter image description here
答案是只有获胜的队才有可能获胜少于50

avkwfej4

avkwfej41#

请尝试以下查询:

SELECT * FROM TABLE_NAME where
(V_G > H_G and Possible_win_V <50)  -- V_G Won & Possibility of winning < 50
OR
(H_G > V_G and Possible_win_H <50); -- H_G Won & Possibility of winning < 50
zfycwa2u

zfycwa2u2#

我想这就是你要找的:

SELECT *
FROM Table1
WHERE (Team1_gols > Team2_gols AND Team1_possible < 50) -- team 1 wins with < 50 probability
      OR
      (Team1_gols < Team2_gols AND Team2_possible < 50) -- team 2 wins with < 50 probability

相关问题