SELECT Id
,COALESCE(segment) AS segment
,COALESCE(country) AS country
,COALESCE(product) AS product
,COALESCE(STATUS) AS STATUS
,COALESCE(month) AS month
,COALESCE(year) AS year
FROM TABLE
select
id,
MAX(segment) as segment,
MAX(country) as country,
MAX(product) as product,
MAX(status) as status,
MAX(month) as month,
MAX(year) as year
from tbl
group by id
2条答案
按热度按时间bxfogqkk1#
gt0wga4j2#
您可以使用以下sql select