Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 00c72d9

Browse files
feat: add sql solution to lc problem: No.2308 (doocs#1900)
1 parent ef47ea0 commit 00c72d9

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

‎solution/2300-2399/2308.Arrange Table by Gender/README.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,19 @@ FROM t
101101
ORDER BY rk1, rk2;
102102
```
103103

104+
```sql
105+
SELECT
106+
user_id,
107+
gender
108+
FROM Genders
109+
ORDER BY
110+
(
111+
RANK() OVER (
112+
PARTITION BY gender
113+
ORDER BY user_id
114+
)
115+
),
116+
2;
117+
```
118+
104119
<!-- tabs:end -->

‎solution/2300-2399/2308.Arrange Table by Gender/README_EN.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,19 @@ FROM t
9696
ORDER BY rk1, rk2;
9797
```
9898

99+
```sql
100+
SELECT
101+
user_id,
102+
gender
103+
FROM Genders
104+
ORDER BY
105+
(
106+
RANK() OVER (
107+
PARTITION BY gender
108+
ORDER BY user_id
109+
)
110+
),
111+
2;
112+
```
113+
99114
<!-- tabs:end -->

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /