Skip to content

Instantly share code, notes, and snippets.

@gregglind
Created August 19, 2010 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregglind/538120 to your computer and use it in GitHub Desktop.
Save gregglind/538120 to your computer and use it in GitHub Desktop.
/* ###########################
set up table and populate it
############################# */
DROP TABLE IF EXISTS t;
CREATE TEMP TABLE t (k varchar, v varchar);
INSERT INTO t VALUES ('1', 'a,b,c');
INSERT INTO t VALUES ('1', 'a,d,e');
INSERT INTO t VALUES ('2', 'e,f');
/* #####################
output wanted
k v
-- ---------
1 a,b,c,d,e
2 e,f
################ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment