ΠΑΟ ΠΑΓΚΕΦΑΛΛΗΝΙΑΚΟΣ
Σκόρερς
Αυτογκόλ
Κόκκινες Κάρτες
Κίτρινες Κάρτες
Λεπτά Συμμετοχής
Error in query: SELECT
CONCAT(
'
',
CAST(CONCAT(surname, ' ', name) AS CHAR),
''
) as onomateponimo,
CONCAT('
',totalMinutes, '\'')
FROM (
SELECT minutes.playerID,
surname,
name,
SUM(minutes) as totalMinutes
FROM (
(
SELECT player_team.playerID,
CAST(duration AS SIGNED) as minutes
FROM game, participation, player_team, league
WHERE game.gameID = participation.gameID
AND player_team.playerID = participation.playerID
AND game.leagueID = league.leagueID
AND league.periodID = '13'
AND player_team.periodID = '13'
AND teamID = '5'
AND finished = '1'
AND wout_play = '0'
AND started = '1'
)
UNION ALL
(
SELECT playerOutID,
IF(CAST(minute-duration-1 AS SIGNED)>0, 0, CAST(minute-duration-1 AS SIGNED)) as minutes
FROM game, substitution, player_team, league
WHERE game.gameID = substitution.gameID
AND player_team.playerID = substitution.playerOutID
AND game.leagueID = league.leagueID
AND league.periodID = '13'
AND player_team.periodID = '13'
AND teamID = '5'
AND finished = '1'
AND wout_play = '0'
)
UNION ALL
(
SELECT playerInID,
IF(CAST(duration-minute+1 AS SIGNED)<0, 0, CAST(duration-minute+1 AS SIGNED)) as minutes
FROM game, substitution, player_team, league
WHERE game.gameID = substitution.gameID
AND player_team.playerID = substitution.playerInID
AND game.leagueID = league.leagueID
AND league.periodID = '13'
AND player_team.periodID = '13'
AND teamID = '5'
AND finished = '1'
AND wout_play = '0'
)
UNION ALL
(
SELECT player_team.playerID,
IF(CAST(minute-duration AS SIGNED)>0, 0, CAST(minute-duration AS SIGNED)) as minutes
FROM game, card, player_team, league
WHERE game.gameID = card.gameID
AND player_team.playerID = card.playerID
AND game.leagueID = league.leagueID
AND league.periodID = '13'
AND player_team.periodID = '13'
AND teamID = '5'
AND finished = '1'
AND wout_play = '0'
AND (color='secYellow' OR color='red')
)
) as minutes, player
WHERE player.playerID = minutes.playerID
GROUP BY minutes.playerID
) as totalMinutes
ORDER BY totalMinutes DESC, BINARY surname, BINARY name.