강의로 돌아가기
xmas6904201@gmail.com

ORACLE

SELECT
animalid ,
name ,
CASE
WHEN sex
uponintake LIKE 'Neutered%' Then 'O'
WHEN sex
uponintake LIKE 'Spayed%' Then 'O'
WHEN sex
uponintake LIKE 'Intact%' THEN 'X'
END
FROM
animal
ins
ORDER BY
animal_id

작성중인 코드―solution.sql
1
2
3
4
5
6
7
8
9
10
11
12
SELECT
    animal_id ,
    name ,
    CASE
        WHEN sex_upon_intake LIKE 'Neutered%' Then 'O'
        WHEN sex_upon_intake LIKE 'Spayed%' Then 'O'
        WHEN sex_upon_intake LIKE 'Intact%' THEN 'X'
    END
FROM
    animal_ins
ORDER BY 
    animal_id
0 개의 답변
답변 쓰기
This input form supports markdown syntax. Please refer to 마크다운 가이드.