SELECT *
,IF(startTimeLocal>=CURDATE(),'is-future','before-today') is_future
,(CASE
WHEN fixtureType = 'PRESEASON' THEN '熱身賽'
WHEN fixtureType = 'REGULAR' THEN '例行賽'
WHEN (fixtureType = 'PLAYOFF' AND LEFT(nameLocal,1)!='F') THEN '季後賽'
WHEN (fixtureType = 'PLAYOFF' AND LEFT(nameLocal,1)='F') THEN '總冠軍賽'
WHEN fixtureType = 'FINAL' THEN '總冠軍賽'
END) row_season_name
,LEFT(startTimeLocal,7) month_str
,WEEKDAY(startTimeLocal) `week`
,DATE_FORMAT(startTimeLocal,'%Y-%m-%d') `date`
,DATE_FORMAT(startTimeLocal,'%H:%i') `time`
,(SELECT nameLocal FROM pleague.ss_venue_easl WHERE ss_venue_easl.venueId=_schedule_easl.venueId LIMIT 1) `location`
,(SELECT CONCAT(`id`,'@_@',`name_en`,'@_@',`short_name`,'@_@',`logo`) FROM pleague.easl_team WHERE 1='1' AND `id`=home_team_id) home_team
,(SELECT CONCAT(`id`,'@_@',`name_en`,'@_@',`short_name`,'@_@',`logo`) FROM pleague.easl_team WHERE 1='1' AND `id`=away_team_id) away_team
FROM pleague._schedule_easl WHERE seasonId IN('','c24ce68a-6420-11ee-9daf-6b6188281bd0') AND (`hidden`=0 OR `hidden` IS NULL) ORDER BY startTimeLocal ASC, externalId ASC