【发布时间】:2010-12-09 03:39:18
【问题描述】:
我有两个表:Match 和 MatchShots。
一个match有很多match_shots,match_shots属于match。
在我的匹配表中,我有一个名为 shot_limit 的属性。
我只想根据以下条件返回那些匹配项:
- 匹配 shot_limit 不为空
- 匹配 shot_limit = 1 且 match_shots 计数 > 0
- 匹配 shot_limit = 3 且 match_shots 计数 > 2
【问题讨论】: