일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- array
- Redshift
- Mac
- math
- django
- 파이썬
- c#
- SQL
- gas
- dataframe
- numpy
- Apache
- Google Excel
- GIT
- Kotlin
- Tkinter
- matplotlib
- list
- Python
- PANDAS
- Github
- Excel
- Java
- PySpark
- Google Spreadsheet
- hive
- PostgreSQL
- google apps script
- string
- Today
- Total
목록분류 전체보기 (832)
달나라 노트
mod(a, b) mod 함수는 a를 b로 나눈 후의 나머지를 반환합니다. select mod(7, 2); -> output = 1 select mod(11, 4); -> output = 3 select mod(100, 30); -> output = 10
임시 테이블을 만드는 방법은 create temp table을 이용하면 됩니다. 근데 with 구문을 이용하여 위와 비슷한 기능을 사용할 수 있습니다. with valid_user as ( selectui.userkey from user.user_info as ui -- where 1=1 and ui.valid = 1 ), user_address as ( selecta.address_code from user.address as a -- where 1=1 and a.valid = 1 ) -- select* from order.order_list as ol -- join valid_user as vu on vu.userkey = ol.userkey join user_address as ua on ua.ad..
create table test_schema.test_table ( col1 varchar(max), col2 bigint(max), col3 varchar(max) ) ; create table은 위처럼 테이블을 생성시킬 수 있도록 합니다. 위 테이블은 col1, col2, col3라는 3개의 column을 가질 것이고, 각 컬럼에 들어갈 값들의 datatype은 순서대로 varchar(문자), bigint(정수), varchar(문자)입니다. create table if not exists test_schema.test_table ( col1 varchar(max), col2 bigint(max), col3 varchar(max) ) ; 또한 if not exists라는 옵션을 추가할 수도 있습니다...
Python의 strip, lstrip, rstrip은 다음과 같은 기능을 가집니다. strip = 문자열의 양쪽 끝에 있는 어떤 텍스트를 제거합니다. lstrip = 문자열의 왼쪽 끝에 있는 어떤 텍스트를 제거합니다. rstrip = 문자열의 오른쪽 끝에 있는 어떤 텍스트를 제거합니다. str_test = ' abcde ' str_stripped = '[' + str_test.strip() + ']' str_lstripped = '[' + str_test.lstrip() + ']' str_rstripped = '[' + str_test.rstrip() + ']' print(str_stripped) print(str_lstripped) print(str_rstripped) - Output [abcde] ..