Created
April 12, 2017 02:37
-
-
Save tomplex/a69b03015529ea8f2ac49c3df16b76db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE users(user_id SERIAL PRIMARY KEY, user_name TEXT); | |
CREATE TABLE mentions(mention_id SERIAL PRIMARY KEY, mention_symbol TEXT, mention_user INT REFERENCES users(user_id), mention_date TIMESTAMP DEFAULT now()); | |
INSERT INTO users (user_name) VALUES ('Tom Taylor'), ('Tom Caruso'), ('Other Rando User'); | |
INSERT INTO mentions (mention_symbol, mention_user) VALUES ('AMD', 2); | |
INSERT INTO mentions (mention_symbol, mention_user) VALUES ('APPL', 1); | |
INSERT INTO mentions (mention_symbol, mention_user) VALUES ('BLPD', 1); | |
INSERT INTO mentions (mention_symbol, mention_user) VALUES ('GALT', 1); | |
INSERT INTO mentions (mention_symbol, mention_user) VALUES ('AKRX', 2); | |
INSERT INTO mentions (mention_symbol, mention_user) VALUES ('AMD', 3); | |
INSERT INTO mentions (mention_symbol, mention_user) VALUES ('AMD', 2); | |
INSERT INTO mentions (mention_symbol, mention_user) VALUES ('AMD', 2); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment