i'm looking to build a query that will give me a count of
away team (h=a) corners (tp=c) where the time (t_val) if greater than 0, 1, 2, 3 minute etc for each id.
So i get a count of how many corners etc are yet to be scored in the game.
so id 67343499 away corners >45 (ie second half) = 2
events id tp h t t_val
67343499 c a 90+2 90
67343499 c a 86 86
67343499 g h 72 72
67343499 g h 55 55
67343499 c h 37 37
67343499 c h 28 28
67343499 c h 24 24
67343499 c h 16 16
67343499 c h 6 6
67343499 c h 4 4
67343476 c h 64 64
67343476 c h 63 63
67343476 c a 62 62
67343476 g a 60 60
67343476 c a 56 56
67343476 c a 55 55
67343476 c a 36 36
67343476 c a 35 35
67343476 c a 22 22
67343476 c a 19 19
67343476 g h 9 9
67343476 g a 7 7
67343476 g h 2 2
67343476 c h 2 2
67343476 c h 1 1
67343479 c a 90+10 90
67343479 c h 90+9 90
67343479 c h 90+8 90
67343479 c a 90+1 90
67343479 c h 81 81
67343479 c a 71 71
67343479 c h 70 70
67343479 c h 69 69
67343479 g a 68 68
67343479 g h 61 61
67343479 c h 61 61
67343479 c a 52 52
67343479 c a 39 39
67343479 c a 38 38
67343479 c h 19 19
67343479 c h 17 17
67343479 g h 10 10
67343479 c h 5 5
67343481 c a 73 73
67343481 c a 70 70
67343481 c h 63 63
67343481 c a 61 61
67343481 c a 60 60
67343481 g h 47 47
67343481 c h 41 41
67343481 c a 38 38
67343481 c h 34 34
67343481 c h 31 31
67343481 c h 27 27
67343481 c h 22 22
67343481 c a 20 20
away team (h=a) corners (tp=c) where the time (t_val) if greater than 0, 1, 2, 3 minute etc for each id.
So i get a count of how many corners etc are yet to be scored in the game.
so id 67343499 away corners >45 (ie second half) = 2
events id tp h t t_val
67343499 c a 90+2 90
67343499 c a 86 86
67343499 g h 72 72
67343499 g h 55 55
67343499 c h 37 37
67343499 c h 28 28
67343499 c h 24 24
67343499 c h 16 16
67343499 c h 6 6
67343499 c h 4 4
67343476 c h 64 64
67343476 c h 63 63
67343476 c a 62 62
67343476 g a 60 60
67343476 c a 56 56
67343476 c a 55 55
67343476 c a 36 36
67343476 c a 35 35
67343476 c a 22 22
67343476 c a 19 19
67343476 g h 9 9
67343476 g a 7 7
67343476 g h 2 2
67343476 c h 2 2
67343476 c h 1 1
67343479 c a 90+10 90
67343479 c h 90+9 90
67343479 c h 90+8 90
67343479 c a 90+1 90
67343479 c h 81 81
67343479 c a 71 71
67343479 c h 70 70
67343479 c h 69 69
67343479 g a 68 68
67343479 g h 61 61
67343479 c h 61 61
67343479 c a 52 52
67343479 c a 39 39
67343479 c a 38 38
67343479 c h 19 19
67343479 c h 17 17
67343479 g h 10 10
67343479 c h 5 5
67343481 c a 73 73
67343481 c a 70 70
67343481 c h 63 63
67343481 c a 61 61
67343481 c a 60 60
67343481 g h 47 47
67343481 c h 41 41
67343481 c a 38 38
67343481 c h 34 34
67343481 c h 31 31
67343481 c h 27 27
67343481 c h 22 22
67343481 c a 20 20