Tinkerbell Glitter
[241108] ์—‘์…€๋ณด๋‹ค ์‰ฝ๊ณ  ๋น ๋ฅธ SQL 2์ฃผ์ฐจ-1~4 ๊ฐ•์˜
[SPARTA] AI 9 (24.11 ~ 25.03) ๐Ÿƒ๐Ÿป‍โ™€๏ธ/SQL ๐Ÿ“™
SQL 2์ฃผ์ฐจ ๊ฐ•์˜~~๊ฐ€๋ณด์ž๊ณ ~~2์ฃผ์ฐจ-1~2๊ฐ•์˜ ์˜ค๋Š˜ ๊ฐ•์˜ ๋‚ด์šฉ์€ ์—ฐ์‚ฐํ•˜๊ธฐ~~food_orders ํ…Œ์ด๋ธ” ์ค‘์—์„œ,food_preparation_time ๊ณผ delivery_time์„ ๋”ํ•œ ๊ฐ’์„ ๊ตฌํ•ด์ค˜.๋ผ๋Š” ์˜๋ฏธ์ธ๋ฐ ์ด์ œ as ๋กœ total_time ์ด๋ผ๋Š” ๋ณ„๋ช…์„ ๊ณ๋“ค์ธ.๋”ํ•˜๊ธฐ๋ฅผ ์“ธ ์ˆ˜ ์žˆ์œผ๋ฉด ๋ญ๋‹ค????๊ณฑํ•˜๊ธฐ๋„ ์‚ฌ์šฉ๊ฐ€๋Šฅ์ด๋‹ค.์—‘์…€์ฒ˜๋Ÿผ ํ•จ์ˆ˜๊ธฐ๋Šฅ๋„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Œ.select sum(food_preparation_time) total_food_preparation_time,            avg(delivey_time) avg_food_preparation_timefrom food_orders ์—์„œsum(์ƒํ’ˆ_์ค€๋น„_์‹œ๊ฐ„์„ ๋ชจ๋‘ ๋”ํ•ด์ค˜) ํ•ฉ๊ณ„_์ƒํ’ˆ_์ค€๋น„_์‹œ๊ฐ„(=๋ณ„๋ช…์„ ์ •ํ•ด์ฃผ๋Š” ๊ฒƒ.)avg(๋ฐฐ๋‹ฌ_์‹œ๊ฐ„ ํ‰๊ท ..