Teradata SQL stack rows per user
问题 Is there a way to stack/group string/text per user ? data I have USER STATES 1 CA 1 AR 1 IN 2 CA 3 CA 3 NY 4 CA 4 AL 4 SD 4 TX What I need is USER STATES 1 CA / AR / IN 2 CA 3 CA / NY 4 CA / AL / SD / TX I tried cross join and then another cross join however but the data spools out. Thanks! 回答1: I am not an expert but this should work. You may need to modify it a bit per your exact requirement. Hope this helps! CREATE VOLATILE TABLE temp AS ( SELECT USER ,STATES ,ROW_NUMBER() OVER (PARTITION