I have an oracle table that has multiple rows of data I am trying to merge based on a date field.
The data looks like this:
I'm trying to make the data look like this:
What would the query look look like to achieve this?
Thank you in advance!
CodePudding user response:
It appears that you just want
select uid, date,
max(first_name) first_name,
max(middle_name) middle_name,
max(last_name) last_name
from your_table
group by uid, date;
That assumes that the sample data from the image is full of null
values when data appears to be missing.