当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 54

fisher / foot
关闭

forked from aoe5188 / foot 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
link_able_c1_e2过滤a1排斥的买31.sql 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
monomania 提交于 2020-02-10 23:42 . 1.xxx
SELECT
ar.`MatchDate`,
ar.`TOVoid`,
ar.`TOVoidDesc`,
ar.`AlFlag`,
ar.`PreResult`,
ar.`Result`,
mh.MainTeamGoals AS MainTeamGoal,
mh.GuestTeamGoals AS GuestTeamGoal,
ar.`HitCount`,
ar.`LetBall`,
ar.`MyLetBall`,
l.Name AS LeagueName,
mh.MainTeamId AS MainTeam,
mh.GuestTeamId AS GuestTeam
FROM
foot.t_league l,
foot.t_match_his mh,
foot.t_analy_result ar,
(SELECT
ar1.`MatchId`
FROM
foot.`t_analy_result` ar1,
foot.`t_analy_result` ar2
WHERE ar1.`MatchId` = ar2.`MatchId`
AND ar1.`AlFlag` = 'E2'
AND ar2.`AlFlag` = 'C1'
AND ar1.`PreResult` = ar2.`PreResult`
AND ar2.`TOVoidDesc` = '') temp
WHERE mh.LeagueId = l.Id
AND mh.Id = ar.MatchId
#AND mh.`MainTeamGoals` != mh.`GuestTeamGoals`
AND ar.`MatchId` = temp.MatchId
AND ar.`AlFlag` IN ('E2', 'C1')
ORDER BY ar.MatchDate DESC,
l.id ASC,
mh.MainTeamId ASC,
ar.`AlFlag` DESC,
ar.`PreResult` DESC
#-------------------------------------
#-------------------------------------
#-------------------------------------
SELECT
COUNT(1) / 2,
ar.`Result`
FROM
foot.t_league l,
foot.t_match_his mh,
foot.t_analy_result ar,
(SELECT
ar1.`MatchId`
FROM
foot.`t_analy_result` ar1,
foot.`t_analy_result` ar2
WHERE ar1.`MatchId` = ar2.`MatchId`
AND ar1.`AlFlag` = 'E2'
AND ar2.`AlFlag` = 'C1'
AND ar1.`PreResult` = ar2.`PreResult`
AND ar2.`TOVoidDesc` = '') temp
WHERE mh.LeagueId = l.Id
AND mh.Id = ar.MatchId
#AND mh.`MainTeamGoals` != mh.`GuestTeamGoals`
AND ar.`MatchId` = temp.MatchId
AND ar.`AlFlag` IN ('E2', 'C1')
GROUP BY ar.`Result`
Go
1
https://gitee.com/fisher2048/foot.git
git@gitee.com:fisher2048/foot.git
fisher2048
foot
foot
master

搜索帮助