USER ID | string_col |
---|---|
100001 | Here |
100001 | there |
100001 | Apple |
200002 | this is |
200002 | that is |
200002 | Apple |
200002 | Cell 4 |
That is my raw table & I want to use the word "Apple" as a trigger word to concatenate everything above that for every userID.
Below table is the output I'm looking for:
USER ID | string_col | Result |
---|---|---|
100001 | Here | null |
100001 | there | null |
100001 | Apple | Here There |
200002 | this is | null |
200002 | that is | null |
200002 | Apple | this is that is |
200002 | Cell 4 | null |