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

发布时间 2023-12-28 23:41:23作者: 爱新觉罗LQ

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

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