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 4bfdb7a

Browse files
feat: add sql solution to lc problem: No.2893 (#1896)
1 parent c51e22f commit 4bfdb7a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

‎solution/2800-2899/2893.Calculate Orders Within Each Interval/README.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,13 @@ FROM T
9494
WHERE minute % 6 = 0;
9595
```
9696

97+
```sql
98+
SELECT
99+
FLOOR((minute + 5) / 6) AS interval_no,
100+
SUM(order_count) AS total_orders
101+
FROM Orders
102+
GROUP BY 1
103+
ORDER BY 1;
104+
```
105+
97106
<!-- tabs:end -->

‎solution/2800-2899/2893.Calculate Orders Within Each Interval/README_EN.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,13 @@ FROM T
8484
WHERE minute % 6 = 0;
8585
```
8686

87+
```sql
88+
SELECT
89+
FLOOR((minute + 5) / 6) AS interval_no,
90+
SUM(order_count) AS total_orders
91+
FROM Orders
92+
GROUP BY 1
93+
ORDER BY 1;
94+
```
95+
8796
<!-- tabs:end -->

0 commit comments

Comments
(0)

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