Skip to content

Instantly share code, notes, and snippets.

Created December 19, 2016 12:43
What would you like to do?
date_add(t.departure, INTERVAL 1286 YEAR),
'%D %b %Y'
) as departure
, concat(coalesce(concat(t.departurestation, ',<br />'),''), as departure_location
, group_concat( separator ', ') as via
, concat(coalesce(concat(t.arrivalstation, ',<br />'),''), as arrival_location
, date_format(
date_add(t.arrival, INTERVAL 1286 YEAR),
'%D %b %Y'
) as arrival
, t.linkpage
, t.linktag
from stwalkerster_ed_explore.trip t
inner join stwalkerster_ed_explore.waypoint wto on = and wto.special = 'a'
inner join stwalkerster_ed_explore.system systo on wto.system =
inner join stwalkerster_ed_explore.system sysfrom on = t.from
left join stwalkerster_ed_explore.waypoint v on v.trip = and v.special = 'v'
left join stwalkerster_ed_explore.system sysv on v.system =
group by t.departure,,, t.arrival, t.linkpage, t.linktag
order by coalesce(t.departure, '9999-12-31');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment