Outlier AI interview question

Create the below table from transaction table and id table.