๐Ÿ’ซ ๋ฌธ์ œ


ย 

๐Ÿ’ซ CODE

SELECT DATETIME AS ์‹œ๊ฐ„ 
FROM ANIMAL_INS 
WHERE DATETIME = (SELECT MAX(DATETIME) FROM ANIMAL_INS);

ย 

๐Ÿ’ซ ํ’€์ด ์กฐ๊ฑด

1. ๊ฐ€์žฅ ์ตœ๊ทผ์— ๋“ค์–ด์˜จ ๋™๋ฌผ
2. ์–ธ์ œ ๋“ค์–ด์™”๋Š”์ง€ ์กฐํšŒ

ย 

๐Ÿ’ซ ํ’€์ด

1. SELECT DATETIME AS ์‹œ๊ฐ„
  • ๋ณดํ˜ธ ์‹œ์ž‘์ผ(DATETIME) ์กฐํšŒ
  • AS๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ณ„์นญ ๋ถ€์—ฌ
2. WHERE DATETIME = (SELECT MAX(DATETIME) FROM ANIMAL_INS)
  • MAX()๋ฅผ ์ด์šฉํ•˜์—ฌ ๋ณดํ˜ธ ์‹œ์ž‘์ผ(DATETIME) ์ตœ๋Œ“๊ฐ’ ์กฐํšŒ

By Dozzing

๋‹ต๊ธ€ ๋‚จ๊ธฐ๊ธฐ

์ด๋ฉ”์ผ ์ฃผ์†Œ๋Š” ๊ณต๊ฐœ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•„์ˆ˜ ํ•„๋“œ๋Š” *๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค