【问题标题】:Why i am not getting distinct records in MYSQL为什么我在 MYSQL 中没有得到不同的记录
【发布时间】:2022-06-29 18:09:40
【问题描述】:

我在 MYSQL 中使用此查询,但仍然无法获取唯一记录

select distinct u.Mobile,t.UserID, t.DateModified,t.RealCash,t.Bonus,t.Winning
from fantasy.Transaction t
JOIN fantasy.Users u
ON t.UserID = u.UserID
where t.DateModified between '2022-06-01 18:30:00' and '2022-06-28 18:29:59' AND t.TransactionType=1  AND t.status=1

错在哪里?请纠正我

【问题讨论】:

    标签: mysql mysql-workbench mysql-date


    【解决方案1】:

    你需要使用GROUP BY u.Mobile

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-05-17
      • 1970-01-01
      • 2022-01-22
      • 2020-11-19
      • 2013-07-15
      • 1970-01-01
      • 2010-12-08
      相关资源
      最近更新 更多