110 likes | 224 Views
자 료. 쿼리 구성물 - 등교 -. 쿼리 구성물 - 하 교 -. 쿼리 구성물 - 요금안내표 -. 특이 노 선 - 주안 , 부평 , 죽전 -. 쿼리 구성 1-1. 쿼리 구성 1-1. SELECT destination AS ' 출발지 ', busstop AS ' 출발장소 ', TIME AS ' 월 ~ 목 ', IF(DAY LIKE ' 금 ', TIME, '') AS ' 금 ', memo AS ' 비고 ' FROM route_timetable
E N D
특이 노선- 주안, 부평, 죽전 -
쿼리 구성 1-1 SELECT destination AS '출발지', busstop AS '출발장소', TIME AS '월~목', IF(DAY LIKE '금', TIME, '') AS '금', memo AS '비고' FROM route_timetable NATURAL JOIN route_busstop WHERE (u_name LIKE '호서대학교') AND (term_category LIKE '2012-2-등교') AND (DAY LIKE '월~목' OR DAY LIKE '금') GROUP BY destination, TIME ORDER BY destination, TIME 메모 강남 금요일 7:20에
쿼리 구성 1-2 & 결과물 SELECT destination AS 출발지, busstop AS 출발장소, memo AS '월~금', '' AS '비고' FROM route_timetable NATURAL JOIN route_busstop WHERE (u_name LIKE '호서대학교') AND (term_category LIKE '2012-2-등교') AND (DAY LIKE '월~금')
쿼리 구성 1-3 & 결과물 SELECT a.destination AS '출발지', busstop AS '출발장소', a.time AS '월', b.time AS '화~금', a.memo FROM route_timetable AS a NATURAL JOIN route_busstop JOIN route_timetable AS b ON (a.u_name LIKE b.u_name) AND (a.term_category LIKE b.term_category) AND (b.day LIKE '화~금') WHERE (a.u_name LIKE '호서대학교') AND (a.term_category LIKE '2012-2-등교') AND (a.DAY LIKE '월') GROUP BY a.destination
쿼리 구성 2-1 결과물 SELECT destination AS '도착지', TIME AS '월~목', IF(DAY LIKE '금', TIME, '') AS '금', memo AS '비고' FROM route_timetable WHERE (u_name LIKE '호서대학교') AND (term_category LIKE '2012-2-하교') GROUP BY destination, TIME