当 重命名的字段和原字段相同时,如何按照新字段进行分组【用序号代替命名】

当 重命名的字段和原字段相同时,如何按照新字段进行分组

1543. 产品名称格式修复【用序号代替命名】

# Write your MySQL query statement below
# select product_name, sale_date from
select lower(trim(product_name)) product_name, left(sale_date, 7) sale_date, count(1) total from Sales
    group by 1, 2
    order by 1, 2 
posted @ 2023-12-28 23:41  爱新觉罗LQ  阅读(13)  评论(0)    收藏  举报