如何组合多个可以放入同一行的列而不是多次显示相同的行?
goto
分为:
flight | Manager | Lead | Worker
---------------------|-----------|-------|--------
Arizona_BGS_Flight_2 | John | |
Arizona_BGS_Flight_2 | | Will |
Arizona_BGS_Flight_2 | | | James
Utah_UTS_Flight_5 | John | |
答案 0 :(得分:0)
您可以使用聚合:
select flight, max(manager) as manager, max(lead) as lead, max(worker) as worker
from t
group by flight;