문제
MYSQL
내가 작성한 오답
: SQL에서는 열 이름에 .(점)을 포함할 수 없기 때문에 오류가 났다.
select year(ym) year, round(avg(PM_VAL1),2) PM10, round(avg(PM_VAL2),2) PM2.5
from air_pollution
where location2 = '수원'
group by 1
order by 1 asc

내가 작성한 정답
: PM2.5를 하나의 문자로 인식하게 해주기 위해서 ‘’안에 넣었다.
select year(ym) year, round(avg(PM_VAL1),2) 'PM10', round(avg(PM_VAL2),2) 'PM2.5'
from air_pollution
where location2 = '수원'
group by 1
order by 1 asc
Share article