Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Distinct row aggregation with ordering - stackoverflow.com/q/43249053/...

Language: Layout:
absolute service time: 8,31 sec 
edit mode |  history  | discussion
   pr_id r quantity
1 abcdefgh-1 3 178
2 abcdefgh-10 3 179
3 abcdefgh-10 1 181
4 abcdefgh-1 1 193
5 abcdefgh-6 1 289
6 abcdefgh-9 3 294
7 abcdefgh-2 1 299
8 abcdefgh-7 1 307
9 abcdefgh-5 3 307
10 abcdefgh-3 3 307
11 abcdefgh-8 1 310
12 abcdefgh-2 3 311
13 abcdefgh-7 3 313
14 abcdefgh-6 3 316
15 abcdefgh-8 3 317
16 abcdefgh-1 2 333
17 abcdefgh-5 1 338
18 abcdefgh-10 2 343
19 abcdefgh-4 3 348
20 abcdefgh-9 1 350
21 abcdefgh-4 1 352
22 abcdefgh-3 1 360
23 abcdefgh-4 2 599
24 abcdefgh-3 2 631
25 abcdefgh-8 2 635
26 abcdefgh-7 2 637
27 abcdefgh-5 2 642
28 abcdefgh-9 2 659
29 abcdefgh-2 2 662
30 abcdefgh-6 2 684
   pr_id r quantity
1 abcdefgh-1 3 178
2 abcdefgh-10 3 179
3 abcdefgh-10 1 181
4 abcdefgh-1 1 193
5 abcdefgh-6 1 289
6 abcdefgh-9 3 294
7 abcdefgh-2 1 299
8 abcdefgh-7 1 307
9 abcdefgh-5 3 307
10 abcdefgh-3 3 307
11 abcdefgh-8 1 310
12 abcdefgh-2 3 311
13 abcdefgh-7 3 313
14 abcdefgh-6 3 316
15 abcdefgh-8 3 317
16 abcdefgh-1 2 333
17 abcdefgh-5 1 338
18 abcdefgh-10 2 343
19 abcdefgh-4 3 348
20 abcdefgh-9 1 350
21 abcdefgh-4 1 352
22 abcdefgh-3 1 360
23 abcdefgh-4 2 599
24 abcdefgh-3 2 631
25 abcdefgh-8 2 635
26 abcdefgh-7 2 637
27 abcdefgh-5 2 642
28 abcdefgh-9 2 659
29 abcdefgh-2 2 662
30 abcdefgh-6 2 684