0
我有两个疑问:一个给我的球员谁有俱乐部开合同(没有结束日期)结合两个MySQL查询的公用部分导致
select ejl_players.id,ejl_players.surname ,ejl_club.short_name
from ejl_players
left join ejl_player_rights r on (r.player_id =ejl_players.id and r.start_date=
(select max(start_date) from ejl_player_rights where player_id=ejl_players.id and end_date is null))
left join ejl_clubs on ejl_club.id=r.club_id
where ejl_club.short_name is not null
二给我的球员名单列表谁自2010年
select s.player_id from ejl_play_stat s
left join ejl_protocols p on p.id=s.protocol_id
group by s.player_id
having max(pdate)<'2010-1-1')
我想是谁在这两个结果存在球员名单没有玩过,谁拥有开放式的合同,但即玩家没有玩过2年。 第二个查询还给10 000条记录,当我试图将它们结合起来像强尼·怀特建议后来我查询未返回(至少在30分钟)
我有类似的结论,但不幸的是,这个查询从未返回(至少在30分钟后)。 – Riho 2012-02-14 09:25:11