- 链接地址:https://blog.csdn.net/weixin_44607838/article/details/120313502
- 链接标题:Leetcode 1484题: Group Sold Products By The Date_1484. group sold products by the date-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:8894
文章浏览阅读401次。题目描述原始表有两个column,一个是产品的售卖日期,另一个是具体的产品名称。样例表题目要求:Write an SQL query to find for each date, the number of distinct products sold and their names.预期结果:My Answer其实这道题难度不大,唯一值得一提的就是如何在mysql进行字符串的拼接。我使用的是group_concat()函数,即对分组后的结果进行拼接。在函数中,我们可以自行定义拼接的符_1484. group sold products by the date
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除