hard
文章平均质量分 94
betty1121
这个作者很懒,什么都没留下…
展开
-
1225. Report Contiguous Dates----判断连续日期
Table:Failed+--------------+---------+| Column Name | Type |+--------------+---------+| fail_date | date |+--------------+---------+Primary key for this table is fail_date.Failed table contains the days of failed tasks.Table:Succeed..原创 2020-10-09 15:01:29 · 716 阅读 · 0 评论 -
615. Average Salary: Departments VS Company----通过DATE_FORMAT( , “%Y-%m“)获得年和月
Given two tables as below, write a query to display the comparison result (higher/lower/same) of the average salary of employees in a department to the company's average salary.Table:salary| id | employee_id | amount | pay_date ||----|------------.原创 2020-09-05 07:04:31 · 251 阅读 · 0 评论 -
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 .原创 2020-09-23 08:23:57 · 285 阅读 · 0 评论 -
1479. Sales by Day of the Week----case when条件检查
Table:Orders+---------------+---------+| Column Name | Type |+---------------+---------+| order_id | int || customer_id | int || order_date | date | | item_id | varchar || quantity | int |+--------------.原创 2020-09-19 08:09:06 · 162 阅读 · 0 评论 -
1127. User Purchase Platform----分组统计,通过产生新的join table来统计不存在的字段组合
Table:Spending+-------------+---------+| Column Name | Type |+-------------+---------+| user_id | int || spend_date | date || platform | enum | | amount | int |+-------------+---------+The table logs the spendings .原创 2020-09-17 16:36:06 · 267 阅读 · 0 评论