回答編集履歴
2
typo\.
test
CHANGED
@@ -16,9 +16,9 @@
|
|
16
16
|
|
17
17
|
order by category, point desc
|
18
18
|
|
19
|
-
) as t
|
19
|
+
) as t
|
20
20
|
|
21
|
-
where t
|
21
|
+
where t.rank <= 2
|
22
22
|
|
23
23
|
order by category, point desc
|
24
24
|
|
1
typo\.
test
CHANGED
@@ -10,15 +10,15 @@
|
|
10
10
|
|
11
11
|
@rank := if (@category = category, @rank + 1, 1) as rank,
|
12
12
|
|
13
|
-
@category := category as dummy
|
13
|
+
@category := category as dummy_field
|
14
14
|
|
15
|
-
from
|
15
|
+
from Table1, (select @rank := 0, @category := 0) as dummy_table
|
16
16
|
|
17
17
|
order by category, point desc
|
18
18
|
|
19
|
-
) as
|
19
|
+
) as table
|
20
20
|
|
21
|
-
where
|
21
|
+
where table.rank <= 2
|
22
22
|
|
23
23
|
order by category, point desc
|
24
24
|
|