๐Ÿ’ฏ Coding Test/SQL ํ…Œ์ŠคํŠธ

1) ๋ฌธ์ œ ์„ค๋ช… ๋‹ค์Œ์€ ์–ด๋Š ์˜๋ฅ˜ ์‡ผํ•‘๋ชฐ์— ๊ฐ€์ž…ํ•œ ํšŒ์› ์ •๋ณด๋ฅผ ๋‹ด์€ USER_INFO ํ…Œ์ด๋ธ”๊ณผ ์˜จ๋ผ์ธ ์ƒํ’ˆ ํŒ๋งค ์ •๋ณด๋ฅผ ๋‹ด์€ ONLINE_SALE ํ…Œ์ด๋ธ” ์ž…๋‹ˆ๋‹ค. USER_INFO ํ…Œ์ด๋ธ”์€ ์•„๋ž˜์™€ ๊ฐ™์€ ๊ตฌ์กฐ๋กœ ๋˜์–ด์žˆ์œผ๋ฉฐ USER_ID, GENDER, AGE, JOINED๋Š” ๊ฐ๊ฐ ํšŒ์› ID, ์„ฑ๋ณ„, ๋‚˜์ด, ๊ฐ€์ž…์ผ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. Column name Type Nullable USER_ID INTEGER FALSE GENDER TINYINT(1) TRUE AGE INTEGER TRUE JOINED DATE FALSE GENDER ์ปฌ๋Ÿผ์€ ๋น„์–ด์žˆ๊ฑฐ๋‚˜ 0 ๋˜๋Š” 1์˜ ๊ฐ’์„ ๊ฐ€์ง€๋ฉฐ 0์ธ ๊ฒฝ์šฐ ๋‚จ์ž๋ฅผ, 1์ธ ๊ฒฝ์šฐ๋Š” ์—ฌ์ž๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. ONLINE_SALE ํ…Œ์ด๋ธ”์€ ์•„๋ž˜์™€ ๊ฐ™์€ ๊ตฌ์กฐ๋กœ ๋˜์–ด์žˆ์œผ๋ฉฐ ONLINE_SALE_ID..
1) ๋ฌธ์ œ ์„ค๋ช… AIR_POLLUTION ํ…Œ์ด๋ธ”์€ ์ „๊ตญ์˜ ์›”๋ณ„ ๋ฏธ์„ธ๋จผ์ง€ ์ •๋ณด๋ฅผ ๋‹ด์€ ํ…Œ์ด๋ธ”์ž…๋‹ˆ๋‹ค. AIR_POLLUTION ํ…Œ์ด๋ธ”์˜ ๊ตฌ์กฐ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์œผ๋ฉฐ LOCATION1, LOCATION2, YM, PM_VAL1, PM_VAL2์€ ๊ฐ๊ฐ ์ง€์—ญ๊ตฌ๋ถ„1, ์ง€์—ญ๊ตฌ๋ถ„2, ์ธก์ •์ผ, ๋ฏธ์„ธ๋จผ์ง€ ์˜ค์—ผ๋„, ์ดˆ๋ฏธ์„ธ๋จผ์ง€ ์˜ค์—ผ๋„๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. Column name Type Nullable LOCATION1 VARCHAR FALSE LOCATION2 VARCHAR FALSE YM DATE FALSE PM_VAL1 NUMBER FLASE PM_VAL2 NUMBER FLASE 2) ๋ฌธ์ œ AIR_POLLUTION ํ…Œ์ด๋ธ”์—์„œ ์ˆ˜์› ์ง€์—ญ์˜ ์—ฐ๋„ ๋ณ„ ํ‰๊ท  ๋ฏธ์„ธ๋จผ์ง€ ์˜ค์—ผ๋„์™€ ํ‰๊ท  ์ดˆ๋ฏธ์„ธ๋จผ์ง€ ์˜ค์—ผ๋„๋ฅผ ์กฐํšŒํ•˜๋Š” SQL๋ฌธ์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”. ์ด๋•Œ, ..
1) ๋ฌธ์ œ ์„ค๋ช… ๋‹ค์Œ์€ ์ค‘๊ณ ๊ฑฐ๋ž˜ ๊ฒŒ์‹œํŒ ์ •๋ณด๋ฅผ ๋‹ด์€ USED_GOODS_BOARD ํ…Œ์ด๋ธ”๊ณผ ์ค‘๊ณ ๊ฑฐ๋ž˜ ๊ฒŒ์‹œํŒ ์ฒจ๋ถ€ํŒŒ์ผ ์ •๋ณด๋ฅผ ๋‹ด์€ USED_GOODS_FILE ํ…Œ์ด๋ธ”์ž…๋‹ˆ๋‹ค. USED_GOODS_BOARD ํ…Œ์ด๋ธ”์€ ๋‹ค์Œ๊ณผ ๊ฐ™์œผ๋ฉฐ BOARD_ID, WRITER_ID, TITLE, CONTENTS, PRICE, CREATED_DATE, STATUS, VIEWS์€ ๊ฒŒ์‹œ๊ธ€ ID, ์ž‘์„ฑ์ž ID, ๊ฒŒ์‹œ๊ธ€ ์ œ๋ชฉ, ๊ฒŒ์‹œ๊ธ€ ๋‚ด์šฉ, ๊ฐ€๊ฒฉ, ์ž‘์„ฑ์ผ, ๊ฑฐ๋ž˜์ƒํƒœ, ์กฐํšŒ์ˆ˜๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. Column name Type Nullable BOARD_ID VARCHAR(5) FALSE WRITER_ID VARCHAR(50) FALSE TITLE VARCHAR(100) FALSE CONTENTS VARCHAR(1000) FALSE PRICE..
1) ๋ฌธ์ œ ์„ค๋ช… ๋‹ค์Œ์€ ์–ด๋Š ํ•œ ๊ฒŒ์ž„์—์„œ ์‚ฌ์šฉ๋˜๋Š” ์•„์ดํ…œ๋“ค์˜ ์•„์ดํ…œ ์ •๋ณด๋ฅผ ๋‹ด์€ ITEM_INFO ํ…Œ์ด๋ธ”์ž…๋‹ˆ๋‹ค. ITEM_INFO ํ…Œ์ด๋ธ”์€ ๋‹ค์Œ๊ณผ ๊ฐ™์œผ๋ฉฐ, ITEM_ID, ITEM_NAME, RARITY, PRICE๋Š” ๊ฐ๊ฐ ์•„์ดํ…œ ID, ์•„์ดํ…œ ๋ช…, ์•„์ดํ…œ์˜ ํฌ๊ท€๋„, ์•„์ดํ…œ์˜ ๊ฐ€๊ฒฉ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค. ITEM_ID INTEGER FALSE ITEM_NAME VARCHAR(N) FALSE RARITY INTEGER FALSE PRICE INTEGER FALSE 2) ๋ฌธ์ œ ITEM_INFO ํ…Œ์ด๋ธ”์—์„œ ํฌ๊ท€๋„๊ฐ€ 'LEGEND'์ธ ์•„์ดํ…œ๋“ค์˜ ๊ฐ€๊ฒฉ์˜ ์ดํ•ฉ์„ ๊ตฌํ•˜๋Š” SQL๋ฌธ์„ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”. ์ด๋•Œ ์ปฌ๋Ÿผ๋ช…์€ 'TOTAL_PRICE'๋กœ ์ง€์ •ํ•ด ์ฃผ์„ธ์š”. 3) ์˜ˆ์‹œ ์˜ˆ๋ฅผ ๋“ค์–ด ITEM_INFO ํ…Œ์ด๋ธ”์ด ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค๋ฉด ITEM_..
1) ๋ฌธ์ œ ์„ค๋ช… ๋‹ค์Œ์€ ์‹๋‹น์˜ ์ •๋ณด๋ฅผ ๋‹ด์€ REST_INFO ํ…Œ์ด๋ธ”๊ณผ ์‹๋‹น์˜ ๋ฆฌ๋ทฐ ์ •๋ณด๋ฅผ ๋‹ด์€ REST_REVIEW ํ…Œ์ด๋ธ”์ž…๋‹ˆ๋‹ค. REST_INFO ํ…Œ์ด๋ธ”์€ ๋‹ค์Œ๊ณผ ๊ฐ™์œผ๋ฉฐ REST_ID, REST_NAME, FOOD_TYPE, VIEWS, FAVORITES, PARKING_LOT, ADDRESS, TEL์€ ์‹๋‹น ID, ์‹๋‹น ์ด๋ฆ„, ์Œ์‹ ์ข…๋ฅ˜, ์กฐํšŒ์ˆ˜, ์ฆ๊ฒจ์ฐพ๊ธฐ์ˆ˜, ์ฃผ์ฐจ์žฅ ์œ ๋ฌด, ์ฃผ์†Œ, ์ „ํ™”๋ฒˆํ˜ธ๋ฅผ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. Column name Type Nullable REST_ID VARCHAR(5) FALSE REST_NAME VARCHAR(50) FALSE FOOD_TYPE VARCHAR(20) TRUE VIEWS NUMBER TRUE FAVORITES NUMBER TRUE PARKING_LOT VARCHAR(1)..
Dev_sHu
'๐Ÿ’ฏ Coding Test/SQL ํ…Œ์ŠคํŠธ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (3 Page)