반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Github
- Redshift
- math
- Python
- c#
- Excel
- matplotlib
- hive
- PANDAS
- gas
- GIT
- Google Excel
- Presto
- Kotlin
- Java
- SQL
- numpy
- PySpark
- string
- Tkinter
- django
- Apache
- list
- google apps script
- dataframe
- array
- 파이썬
- PostgreSQL
- Google Spreadsheet
Archives
- Today
- Total
달나라 노트
Redshift : mod (나누기 후의 나머지 반환) 본문
728x90
반응형
mod(a, b)
mod 함수는 a를 b로 나눈 후의 나머지를 반환합니다.
select mod(7, 2); -> output = 1
select mod(11, 4); -> output = 3
select mod(100, 30); -> output = 10
728x90
반응형
'SQL > Redshift' 카테고리의 다른 글
| Redshift : cast, convert (data type 변경하기) (0) | 2021.01.22 |
|---|---|
| Redshift : random (0(포함)~1(제외) 사이의 랜덤한 실수 반환) (0) | 2021.01.22 |
| Redshift : with (임시 테이블 (같은 것) 만들어 이용하기) (0) | 2021.01.21 |
| Redshift : create table, drop table (테이블 생성하고 삭제하기) (0) | 2021.01.21 |
| Redshift : position (문자열에서 특정 문자 위치 찾기) (0) | 2021.01.02 |
Comments