반응형
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 | 29 | 30 |
31 |
Tags
- SQL
- list
- numpy
- dataframe
- Redshift
- Apache
- Github
- math
- c#
- PostgreSQL
- hive
- 파이썬
- GIT
- Java
- Excel
- string
- matplotlib
- google apps script
- Google Excel
- Mac
- array
- PySpark
- Google Spreadsheet
- Python
- Kotlin
- gas
- Tkinter
- django
- PANDAS
Archives
- Today
- Total
목록SQL/Redshift (78)
달나라 노트
Redshift : RANK, DENSE_RANK, ROW_NUMBER (순위, 컬럼번호 부여하기)
RANK() OVER() 예시 테이블 Table Name : salary_list id part name salary 1 First_Part One 1000 2 First_Part Two 1900 3 First_Part Three 1400 4 First_Part Four 1700 5 First_Part Five 1400 6 Second_Part Six 1900 7 Second_Part Seven 1200 8 Second_Part Eight 1200 9 Second_Part Nine 1200 10 Second_Part Ten 1300 SELECT *, RANK() OVER(ORDER BY salary DESC) AS rank FROM salary_list Result Set id part name sala..
SQL/Redshift
2020. 12. 17. 02:12