特牛网址导航

Leetcode 1484题: Group Sold Products By The Date_1484. group sold products by the date-CSDN博客

网友收藏
文章浏览阅读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