Adjust Watt
Coddy SQL 여정의 기초 섹션에 포함된 레슨. 72개 중 52번째.
챌린지
쉬움사용 가능한 테이블 및 열:
<strong>enom_gilpane</strong>:<strong>part_id</strong>,<strong>rpm</strong>,<strong>watt</strong>,<strong>size</strong>
이 프로젝트에서 당신은 가상의 제품 공장 방문자입니다. 당신의 산업 분야에 구매할 최고 품질의 제품을 찾고 싶어 합니다.
각 테이블은 제품을 나타내며 각 제품에는 많은 부품이 있습니다. 모든 테이블(이후 챌린지에서 추가될 예정)은 동일한 열을 가집니다.
이번 챌린지에서는 하나의 제품(테이블)에만 집중합니다.
당신의 작업은 watt 값을 조정하는 것입니다: 각 행에 대해, 전체 테이블에서 계산된 전체 평균 watt 값을 해당 특정 부품의 기존 watt 값에 더하세요.
즉, 테이블 내 모든 부품의 평균 watt를 계산한 다음, 이 동일한 평균을 각 개별 부품의 watt 값에 더합니다.
part_id, rpm, adjusted_watt, size를 반환하세요.
직접 해보기
-- 각 행에 대해 전체 테이블의 평균을 해당 행의 값에 더합니다
SELECT part_id, rpm, watt + ____ AS adjusted_watt, size
FROM enom_gilpane기초의 모든 레슨
4More Keywords
The IN keywordThe BETWEEN keywordThe LIKE keywordThe AS keywordRecap - Cellphone Models10Imaginary Products
Adjust WattCalculate Product Quality2Conditions
Conditions BasicsThe AND keywordThe OR keywordThe NOT keywordMultiple Conditions CombinedParenthesisBooleans5Arithmetic Operations
Mathematical OperatorsMathematical ColumnsThe Modulo OperationThe ROUND() Function3Specific Return Format
Null valuesSort Results Part 1Sort Results Part 2Recap - Cyber Security FirmLimit number of recordsRecap - Vehicle Factory6Intro Challenges
Recap - Parliamentary ElectionRecap - Police Criminal ArrestRecap - Bar Beverage ContainerRecap - Engineer new columns직접 연습해 보세요: SQL 플레이그라운드