SELECT
CASE
WHEN A=B AND B=C THEN 'Equilateral'
WHEN (A>=B+C) OR (B>=A+C) OR (C>=A+B) THEN 'Not A Triangle'
WHEN (A=B) OR (A=C) OR (B=C) THEN 'Isosceles'
ELSE 'Scalene'
END
FROM
triangles
;
→ CASE WHEN 의 조건은 순서대로 진행되므로 어떤 조건이 먼저 와야하는지 생각해야 함!
SELECT
CONCAT(name,'(',LEFT(occupation,1),')')
FROM
occupations
ORDER BY
name
;
SELECT
CONCAT('There are a total of ', COUNT(occupation), ' ', LOWER(occupation), 's.')
FROM
occupations
GROUP BY
occupation
ORDER BY
COUNT(occupation)
, occupation
;
def solution(n, m, section):
answer = 0
paint = 0
for i in section:
if i > paint:
paint = i+m-1
answer += 1
return answer
def solution(n, m, section):
answer = 1
prev = section[0]
for sec in section:
if sec - prev >= m:
prev = sec
answer += 1
return answer
def solution(n, m, section):
answer = 1 # 칠하는 횟수
paint = section[0] # 덧칠 시작점
for i in range(1, len(section)):
if section[i] - paint >= m:
answer += 1
paint = section[i]
return answer
paint를 section[0]으로 정해놓고 for문을 통해 paint와 section[i] 간의 간격 구하기m-1section[i]-paint가 m이상이면 answer+1section[i]를 paint 시작점으로 바꾸고 다시 범위를 찾는 과정인 for문을 반복geopandas
geopandas (2)
중복값 확인 및 처리
데이터의 정규화 또는 표준화가 필요한 이유
왜도와 첨도 구하기 & 로그변환
다중회귀 vs 다항회귀