mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 15:31:43 +08:00
存量题库数据更新
This commit is contained in:
@@ -11,9 +11,9 @@
|
||||
| status | enum |
|
||||
| request_at | date |
|
||||
+-------------+----------+
|
||||
id is the primary key for this table.
|
||||
id is the primary key (column with unique values) for this table.
|
||||
The table holds all taxi trips. Each trip has a unique id, while client_id and driver_id are foreign keys to the users_id at the Users table.
|
||||
Status is an ENUM type of ('completed', 'cancelled_by_driver', 'cancelled_by_client').
|
||||
Status is an ENUM (category) type of ('completed', 'cancelled_by_driver', 'cancelled_by_client').
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
@@ -28,23 +28,23 @@ Status is an ENUM type of ('completed', 'cancelled_by_driver', &
|
||||
| banned | enum |
|
||||
| role | enum |
|
||||
+-------------+----------+
|
||||
users_id is the primary key for this table.
|
||||
users_id is the primary key (column with unique values) for this table.
|
||||
The table holds all users. Each user has a unique users_id, and role is an ENUM type of ('client', 'driver', 'partner').
|
||||
banned is an ENUM type of ('Yes', 'No').
|
||||
banned is an ENUM (category) type of ('Yes', 'No').
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>The <strong>cancellation rate</strong> is computed by dividing the number of canceled (by client or driver) requests with unbanned users by the total number of requests with unbanned users on that day.</p>
|
||||
|
||||
<p>Write a SQL query to find the <strong>cancellation rate</strong> of requests with unbanned users (<strong>both client and driver must not be banned</strong>) each day between <code>"2013-10-01"</code> and <code>"2013-10-03"</code>. Round <code>Cancellation Rate</code> to <strong>two decimal</strong> points.</p>
|
||||
<p>Write a solution to find the <strong>cancellation rate</strong> of requests with unbanned users (<strong>both client and driver must not be banned</strong>) each day between <code>"2013-10-01"</code> and <code>"2013-10-03"</code>. Round <code>Cancellation Rate</code> to <strong>two decimal</strong> points.</p>
|
||||
|
||||
<p>Return the result table in <strong>any order</strong>.</p>
|
||||
|
||||
<p>The query result format is in the following example.</p>
|
||||
<p>The result format is in the following example.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong>
|
||||
|
Reference in New Issue
Block a user