質問するログイン新規登録

回答編集履歴

2

見直し

2017/04/05 10:39

投稿

退会済みユーザー
answer CHANGED
@@ -1,4 +1,3 @@
1
- ORDER BYで降順に並べ替える。
2
1
  rank()を使って日付降順の並びに順位をつける。
3
2
  それをサブクエリーに書いて、ランクの数字で制限する。
4
3
 

1

加筆修正

2017/04/05 10:39

投稿

退会済みユーザー
answer CHANGED
@@ -2,4 +2,7 @@
2
2
  rank()を使って日付降順の並びに順位をつける。
3
3
  それをサブクエリーに書いて、ランクの数字で制限する。
4
4
 
5
- [Window関数 | Let's Postgres](http://lets.postgresql.jp/documents/technical/window_functions)
5
+ [Window関数 | Let's Postgres](http://lets.postgresql.jp/documents/technical/window_functions)
6
+ [PostgreSQLウィンドウ関数のTips | インフラ・ミドルウェア | POSTD](http://postd.cc/window_functions_postgresql/)
7
+ [PostgreSQLの分析関数の衝撃6 (window関数の応用例) (1/4):CodeZine(コードジン)](http://codezine.jp/article/detail/4747)
8
+ [PostgreSQLの分析関数の衝撃(7) ――window関数の変わった使用例 (1/4):CodeZine(コードジン)](http://codezine.jp/article/detail/4790)