MySQL - MIN and MAX Basic

임재현·2021년 5월 6일
0

MySQL

목록 보기
29/52
post-custom-banner

UDEMY - The Ultimate MySQL Bootca…The Ultimate MySQL Bootcamp: Go from SQL Beginner to Expert를 수강하며 정리한 글

MIN

mysql> SELECT MIN(released_year) FROM books;
+--------------------+
| MIN(released_year) |
+--------------------+
|               1945 |
+--------------------+
1 row in set (0.00 sec)

mysql> SELECT MIN(pages) FROM books;
+------------+
| MIN(pages) |
+------------+
|        176 |
+------------+
1 row in set (0.00 sec)

MAX

mysql> SELECT MAX(released_year) FROM books;
+--------------------+
| MAX(released_year) |
+--------------------+
|               2017 |
+--------------------+
1 row in set (0.00 sec)


mysql> SELECT MAX(pages) FROM books;
+------------+
| MAX(pages) |
+------------+
|        634 |
+------------+
1 row in set (0.01 sec)
profile
임재현입니다.
post-custom-banner

0개의 댓글