mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 23:11:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
| join_date | date |
|
||||
| favorite_brand | varchar |
|
||||
+----------------+---------+
|
||||
user_id is the primary key of this table.
|
||||
user_id is the primary key (column with unique values) of this table.
|
||||
This table has the info of the users of an online shopping website where users can sell and buy items.
|
||||
</pre>
|
||||
|
||||
@@ -26,8 +26,8 @@ This table has the info of the users of an online shopping website where users c
|
||||
| buyer_id | int |
|
||||
| seller_id | int |
|
||||
+---------------+---------+
|
||||
order_id is the primary key of this table.
|
||||
item_id is a foreign key to the Items table.
|
||||
order_id is the primary key (column with unique values) of this table.
|
||||
item_id is a foreign key (reference column) to the Items table.
|
||||
buyer_id and seller_id are foreign keys to the Users table.
|
||||
</pre>
|
||||
|
||||
@@ -42,19 +42,19 @@ buyer_id and seller_id are foreign keys to the Users table.
|
||||
| item_id | int |
|
||||
| item_brand | varchar |
|
||||
+---------------+---------+
|
||||
item_id is the primary key of this table.
|
||||
item_id is the primary key (column with unique values) of this table.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>Write an SQL query to find for each user, the join date and the number of orders they made as a buyer in <code>2019</code>.</p>
|
||||
<p>Write a solution to find for each user, the join date and the number of orders they made as a buyer in <code>2019</code>.</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