Home > database >  Help, help, not the sum group by, how to merge the same kind of other field values? thank you
Help, help, not the sum group by, how to merge the same kind of other field values? thank you

Time:09-21


Based on table A

Xingming football basketball
Zhang SAN has two
Zhang SAN and li si
Li si very happy
Li si good


Result table B
Xingming football basketball
Zhang SAN and li si together with two
Li si very happy good

CodePudding user response:

Every one of us, there are more than 2 lines of data, how to value?

CodePudding user response:

The select xingming, Max (football), Max (basketball)
The from base table A
Group by xingming

Premise is as example, each row is a Null, or to use listagg function

CodePudding user response:

Dizzy, didn't pay attention to the group by cannot be used, this was stumped, listagg also want to use group by
This is the actual situation, or the topic?

CodePudding user response:

Analysis of the function + distinct?