[leetcode][Database][Hard] 1159. Market Analysis II

題目 Table: Users +----------------+---------+ | Column Name | Type | +----------------+---------+ | user_id | int | | join_date | date | | favorite_brand | varchar | +----------------+---------+ user_id is the primary key of this table. This table has the info of the users of an online shopping website where users can sell and buy items. Table: Orders +---------------+---------+ | Column Name | Type | +---------------+---------+ | order_id | int...

<span title='2022-12-06 12:27:16.979 +0000 UTC'>December 6, 2022</span>&nbsp;·&nbsp;2 分鐘&nbsp;·&nbsp;815 字&nbsp;·&nbsp;ZhengWei, Liu

[leetcode][Database][Hard] 1194. Tournament Winners

題目 Table: Players +-------------+-------+ | Column Name | Type | +-------------+-------+ | player_id | int | | group_id | int | +-------------+-------+ player_id is the primary key of this table. Each row of this table indicates the group of each player. Table: Matches +---------------+---------+ | Column Name | Type | +---------------+---------+ | match_id | int | | first_player | int | | second_player | int | | first_score |...

<span title='2022-12-06 09:28:54.784 +0000 UTC'>December 6, 2022</span>&nbsp;·&nbsp;2 分鐘&nbsp;·&nbsp;645 字&nbsp;·&nbsp;ZhengWei, Liu

[leetcode][Database][Hard] 1384. Total Sales Amount by Year

題目 Table: Product +---------------+---------+ | Column Name | Type | +---------------+---------+ | product_id | int | | product_name | varchar | +---------------+---------+ product_id is the primary key for this table. product_name is the name of the product. Table: Sales +---------------------+---------+ | Column Name | Type | +---------------------+---------+ | product_id | int | | period_start | date | | period_end | date | | average_daily_sales | int | +---------------------+---------+ product_id...

<span title='2022-12-06 09:05:48.196 +0000 UTC'>December 6, 2022</span>&nbsp;·&nbsp;2 分鐘&nbsp;·&nbsp;576 字&nbsp;·&nbsp;ZhengWei, Liu

[leetcode][Database][Hard] 1479. Sales by Day of the Week

題目 Table: Orders +---------------+---------+ | Column Name | Type | +---------------+---------+ | order_id | int | | customer_id | int | | order_date | date | | item_id | varchar | | quantity | int | +---------------+---------+ (ordered_id, item_id) is the primary key for this table. This table contains information on the orders placed. order_date is the date item_id was ordered by the customer with id customer_id. Table: Items...

<span title='2022-12-06 08:37:04.705 +0000 UTC'>December 6, 2022</span>&nbsp;·&nbsp;2 分鐘&nbsp;·&nbsp;903 字&nbsp;·&nbsp;ZhengWei, Liu

[leetcode][Database][Hard]1972. First and Last Call On the Same Day

題目 Table: Calls +--------------+----------+ | Column Name | Type | +--------------+----------+ | caller_id | int | | recipient_id | int | | call_time | datetime | +--------------+----------+ (caller_id, recipient_id, call_time) is the primary key for this table. Each row contains information about the time of a phone call between caller_id and recipient_id. Write an SQL query to report the IDs of the users whose first and last calls on...

<span title='2022-12-06 05:39:34.595 +0000 UTC'>December 6, 2022</span>&nbsp;·&nbsp;1 分鐘&nbsp;·&nbsp;479 字&nbsp;·&nbsp;ZhengWei, Liu

[leetcode][Database][Hard] 2004. The Number of Seniors and Juniors to Join the Company

題目 Table: Candidates +-------------+------+ | Column Name | Type | +-------------+------+ | employee_id | int | | experience | enum | | salary | int | +-------------+------+ employee_id is the primary key column for this table. experience is an enum with one of the values ('Senior', 'Junior'). Each row of this table indicates the id of a candidate, their monthly salary, and their experience. A company wants to hire...

<span title='2022-12-05 09:07:42.185 +0000 UTC'>December 5, 2022</span>&nbsp;·&nbsp;2 分鐘&nbsp;·&nbsp;701 字&nbsp;·&nbsp;ZhengWei, Liu

[leetcode][Database][Hard] 2153. The Number of Passengers in Each Bus II

題目 Table: Buses +--------------+------+ | Column Name | Type | +--------------+------+ | bus_id | int | | arrival_time | int | | capacity | int | +--------------+------+ bus_id is the primary key column for this table. Each row of this table contains information about the arrival time of a bus at the LeetCode station and its capacity (the number of empty seats it has). No two buses will arrive...

<span title='2022-12-05 08:34:19.919 +0000 UTC'>December 5, 2022</span>&nbsp;·&nbsp;2 分鐘&nbsp;·&nbsp;716 字&nbsp;·&nbsp;ZhengWei, Liu

[leetcode][Database][Hard] 2252. Dynamic Pivoting of a Table

題目 Table: Products +-------------+---------+ | Column Name | Type | +-------------+---------+ | product_id | int | | store | varchar | | price | int | +-------------+---------+ (product_id, store) is the primary key for this table. Each row of this table indicates the price of product_id in store. There will be at most 30 different stores in the table. price is the price of the product at this store....

<span title='2022-12-05 08:12:40.016 +0000 UTC'>December 5, 2022</span>&nbsp;·&nbsp;2 分鐘&nbsp;·&nbsp;512 字&nbsp;·&nbsp;ZhengWei, Liu

Customer Data Platform 是如何煉成的 (三)

在最後給出的結論如下 在前 6% 的首次訪問者中,超過 6% 的人會在後續訪問時產生購買行為 整體而言,只有 0.7% 的首次訪問者,會在後續訪問時產生購買行為 瞄準前 6% 的第一次訪問者名單,會使營銷投資回報率提高 9 倍 因此,若是能夠在得到模型預測的結果後,依據營銷策略進行即時的投放處理,包含但不限於: EDM廣告、Coupon折價券或是限定綑綁折扣等等,建構起一個自動化營銷的方法;這也是一種 Data Driven 的方法。

<span title='2022-04-04 16:27:27.434 +0000 UTC'>April 4, 2022</span>&nbsp;·&nbsp;4 分鐘&nbsp;·&nbsp;1733 字&nbsp;·&nbsp;ZhengWei, Liu

Customer Data Platform 是如何煉成的 (二)

顯而易見,討論出一個有共識、覺得可行的方式將問題進行轉化,這就屬於洞察(Insights);而被提出的問題本身,則是被發現的異常(Anomaly)。原文最後提出「具有評分等級的使用者清單」則是貢獻(Contribute)。 有趣的是,當營銷人員依據清單進行預算投放後,便又能獲取新一輪的結果,這個結果除了可供驗證,同時也具備發現新異常的可能性。

<span title='2022-03-28 13:41:44.862 +0000 UTC'>March 28, 2022</span>&nbsp;·&nbsp;3 分鐘&nbsp;·&nbsp;1218 字&nbsp;·&nbsp;ZhengWei, Liu