Skip to content

Instantly share code, notes, and snippets.

@steinitzu
Created March 9, 2013 22:23
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 steinitzu/5126024 to your computer and use it in GitHub Desktop.
Save steinitzu/5126024 to your computer and use it in GitHub Desktop.
DROP TABLE attributes;
CREATE TABLE attributes(
key VARCHAR,
value VARCHAR,
entity_id INTEGER);
INSERT INTO attributes(key,value,entity_id) values ('j','raugaj',1);
INSERT INTO attributes(key,value,entity_id) values ('n','lion',7);
INSERT INTO attributes(key,value,entity_id) values ('f','wolf',19);
INSERT INTO attributes(key,value,entity_id) values ('c','fennec',233);
INSERT INTO attributes(key,value,entity_id) values ('l','squirrel',7);
INSERT INTO attributes(key,value,entity_id) values ('o','hippo',899);
INSERT INTO attributes(key,value,entity_id) values ('p','wasp',88);
INSERT INTO attributes(key,value,entity_id) values ('i','pichi',19);
INSERT INTO attributes(key,value,entity_id) values ('b','crab',233);
INSERT INTO attributes(key,value,entity_id) values ('m','earthworm',500);
INSERT INTO attributes(key,value,entity_id) values ('g','bullfrog',1435);
INSERT INTO attributes(key,value,entity_id) values ('k','aardvark',999);
INSERT INTO attributes(key,value,entity_id) values ('e','gazelle',8282);
INSERT INTO attributes(key,value,entity_id) values ('a','gorilla',500);
INSERT INTO attributes(key,value,entity_id) values ('h','monkfish',1);
INSERT INTO attributes(key,value,entity_id) values ('d','lizard',88);
INSERT INTO attributes(key,value,entity_id) values (null,null,1);
SELECT group_concat(key),group_concat(value) FROM attributes ORDER BY entity_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment