Skip to content

SQL Practice 3

1. 문제 [[object Object]]

다음 환자 테이블에서 first_name이 'C'로 시작하는 환자의 first_name을 표시하시오.

patient_idfirst_namelast_namegenderbirth_datecityprovince_idallergiesheightweight
1DonaldWaterfieldM1963-02-12BarrieONNULL15665
2MickeyBaashaM1981-05-28DundasONSulfa18576
3JijiSharmaM1957-09-05HamiltonONPenicillin194106
4BlairDiazM1967-01-07HamiltonONNULL191104
5CharlesWolfeM2017-11-19OrilliaONPenicillin4710
6SueFalconF2017-09-30AjaxONPenicillin435

2. 정답

SELECT
  first_name,
  last_name
FROM patients
WHERE weight BETWEEN 100 AND 120;

3. 다른 정답

SELECT
  first_name,
  last_name
FROM patients
WHERE weight >= 100 AND weight <= 120;

3. 결과

first_namelast_name
JijiSharma
BlairDiaz