Code: Select all
select AVG(event_sum) AS schnitt,
SUM(event_sum) AS total,
event_type_id, match_id, me.project_id, player_id, me.team_id, p.lastname,
p.firstname, t.middle_name, dv.shortname AS liga
FROM db601052.k23000_joomleague_match_events AS me
INNER JOIN k23000_joomleague_team_player AS tp ON tp.person_id = me.player_id
INNER JOIN k23000_joomleague_persons AS p ON p.id = me.player_id
INNER JOIN k23000_joomleague_project_team AS pt ON pt.project_id = me.project_id
INNER JOIN k23000_joomleague_teams AS t ON t.id = me.team_id
INNER JOIN k23000_joomleague_divisions AS dv ON dv.project_id = me.project_id AND dv.id = '23001'
WHERE me.event_type_id = '9' AND
me.project_id = '22' AND
dv.id = '23001'
GROUP BY t.id
ORDER BY total DESC;
all tables has got the requested data but result is 0 records are selecteted, tested statement by statement but all together get a zero result, so it must be a bug in my coding!? But where?
I need help, where I'm producing bullshit, please