Skip to content

Commit fa3337e

Browse files
add 1661
1 parent c7ff64d commit fa3337e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,7 @@ _If you like this project, please leave me a star._ ★
10771077
|1683|[Invalid Tweets](https://leetcode.com/problems/invalid-tweets/)|[Solution](../master/database/_1683.sql) || Easy |
10781078
|1677|[Product's Worth Over Invoices](https://leetcode.com/problems/products-worth-over-invoices/)|[Solution](../master/database/_1677.sql) || Easy |
10791079
|1667|[Fix Names in a Table](https://leetcode.com/problems/fix-names-in-a-table/)|[Solution](../master/database/_1667.sql) || Easy |
1080+
|1661|[Average Time of Process per Machine](https://leetcode.com/problems/average-time-of-process-per-machine/)|[Solution](../master/database/_1661.sql) || Easy |
10801081
|1607|[Sellers With No Sales](https://leetcode.com/problems/sellers-with-no-sales/)|[Solution](../master/database/_1607.sql) || Easy |
10811082
|1581|[Customer Who Visited but Did Not Make Any Transactions](https://leetcode.com/problems/customer-who-visited-but-did-not-make-any-transactions/)|[Solution](../master/database/_1581.sql) || Easy |
10821083
|1543|[Fix Product Name Format](https://leetcode.com/problems/fix-product-name-format/)|[Solution](../master/database/_1543.sql) || Easy |

database/_1661.sql

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
select s.machine_id, round(avg(e.timestamp - s.timestamp), 3) as processing_time
2+
from Activity s join Activity e
3+
on s.machine_id = e.machine_id and s.process_id = e.process_id and s.activity_type = 'start' and e.activity_type = 'end' group by s.machine_id;

0 commit comments

Comments
 (0)