๐Ÿ’ซ ๋ฌธ์ œ


ย 

๐Ÿ’ซ CODE

SELECT ANIMAL_ID, NAME, DATETIME
FROM ANIMAL_INS
ORDER BY NAME ASC, DATETIME DESC;

ย 

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

1. ๋ชจ๋“  ๋™๋ฌผ์˜ ๋™๋ฌผ ์•„์ด๋””(ANIMAL_ID), ๋™๋ฌผ ์ด๋ฆ„(NAME), ๋ณดํ˜ธ ์‹œ์ž‘์ผ(DATETIME) ์กฐํšŒ
2. ๋™๋ฌผ ์ด๋ฆ„(NAME) ์ˆœ์œผ๋กœ ์กฐํšŒ
3. ์ด๋ฆ„์ด ๊ฐ™์€ ๋™๋ฌผ ์ค‘์—์„œ๋Š” ๋ณดํ˜ธ๋ฅผ ๋‚˜์ค‘์— ์‹œ์ž‘ํ•œ ๋™๋ฌผ์„ ๋จผ์ € ๋‚˜์˜ค๋„๋ก !

ย 

๐Ÿ’ซ ํ’€์ด

1. SELECT ANIMAL_ID, NAME, DATETIME
  • ๋™๋ฌผ ์•„์ด๋””(ANIMAL_ID), ๋™๋ฌผ ์ด๋ฆ„(NAME), ๋ณดํ˜ธ ์‹œ์ž‘์ผ(DATETIME)
2. ORDER BY NAME ASC, DATETIME DESC;
  • ์ด๋ฆ„(NAME) ์ˆœ์œผ๋กœ ์กฐํšŒ(์˜ค๋ฆ„์ฐจ์ˆœ/ASC)
  • ์ด๋ฆ„์ด ๊ฐ™์„ ๊ฒฝ์šฐ, ๋ณดํ˜ธ ์‹œ์ž‘์ผ(DATETIME) ๋‚ด๋ฆผ์ฐจ์ˆœ(DESC)

By Dozzing

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

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