개인적인 사정으로 인하여 mySQL -> Oracle 기반으로 변경하여 작성
SELECT
*
FROM FIRST_HALF
SELECT
*
FROM ICECREAM_INFO
SELECT flavor
FROM FIRST_HALF
SELECT flavor
FROM FIRST_HALF
WHERE total_order >= 3000
SELECT flavor
FROM ICECREAM_INFO
WHERE ingredient_type = 'fruit_based'
SELECT fh.flavor
FROM FIRST_HALF fh LEFT JOIN ICECREAM_INFO ii ON fh.flavor = ii.flavor
WHERE fh.total_order >=3000 AND ii.ingredient_type = 'fruit_based'
SELECT fh.flavor
FROM FIRST_HALF fh LEFT JOIN ICECREAM_INFO ii ON fh.flavor = ii.flavor
WHERE fh.total_order >=3000 AND ii.ingredient_type = 'fruit_based'
ORDER BY fh.total_order DESC
SELECT
*
FROM DOCTOR
SELECT dr_name
, dr_id
, mcdp_cd
, hire_ymd
FROM DOCTOR
SELECT dr_name
, dr_id
, mcdp_cd
, hire_ymd
FROM DOCTOR
WHERE mcdp_cd = 'CS' OR mcdp_cd = 'GS'
SELECT dr_name 이름
, dr_id
, mcdp_cd
, TO_CHAR (hire_ymd, 'YYYY-MM-DD')
FROM DOCTOR
WHERE mcdp_cd = 'CS' OR mcdp_cd = 'GS'
ORDER BY hire_ymd DESC, dr_name ASC
SELECT
*
FROM MEMBER_PROFILE
SELECT member_id
, member_name
, gender
, date_of_birth
FROM MEMBER_PROFILE
SELECT member_id
, member_name
, gender
, TO_CHAR (date_of_birth,'YYYY-MM-DD') AS date_of_birth
FROM MEMBER_PROFILE
WHERE GENDER = 'W'
AND TO_CHAR (date_of_birth,'MM') = '03'
SELECT member_id
, member_name
, gender
, TO_CHAR (date_of_birth,'YYYY-MM-DD') AS date_of_birth
FROM MEMBER_PROFILE
WHERE GENDER = 'W'
AND TO_CHAR (date_of_birth,'MM') = '03'
AND TLNO IS NOT NULL
SELECT member_id
, member_name
, gender
, TO_CHAR (date_of_birth,'YYYY-MM-DD') AS date_of_birth
FROM MEMBER_PROFILE
WHERE GENDER = 'W'
AND TO_CHAR (date_of_birth,'MM') = '03'
AND TLNO IS NOT NULL
ORDER BY member_id ASC