Commit 2270c2c 1 parent 1416f23 commit 2270c2c Copy full SHA for 2270c2c
File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 29
29
-- inner join to ensure both user and submission record exists
30
30
inner join user u
31
31
on s .user_id = u .user_id
32
- -- these 2 joins bring in the last game_player for a submission
32
+ -- these 3 joins bring in the last game_player and game for a submission
33
33
left outer join (select submission_id, max (game_id) as game_id
34
34
from game_player
35
35
group by submission_id) gpmax
36
36
on gpmax .submission_id = s .submission_id
37
37
left outer join game_player gp
38
38
on gp .submission_id = gpmax .submission_id
39
- and gp .game_id = gpmax .game_id ,
39
+ and gp .game_id = gpmax .game_id
40
+ left outer join game g
41
+ on g .game_id = gpmax .game_ID ,
40
42
(select @count1 := 0 ) c1,
41
43
(select @count2 := 0 ) c2
42
44
where s .latest = 1
43
45
-- ghost requirements
44
46
or (
45
47
-- can only be 48 hours old
46
- s .timestamp > timestampadd(hour, - 400 , current_timestamp )
48
+ g .timestamp > timestampadd(hour, - 48 , current_timestamp )
47
49
-- must have smaller sigma (more confident than current)
48
50
and s .sigma = (select min (sigma)
49
51
from submission s2
You can’t perform that action at this time.
0 commit comments