Created
September 29, 2022 16:12
-
-
Save fmnobar/cfaadf4ae77e5efe1940447f01c0e165 to your computer and use it in GitHub Desktop.
SQL
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
DROP TABLE IF EXISTS misc_part1; | |
CREATE TEMPORARY TABLE misc_part1 ( | |
name VARCHAR(30), | |
last_contacted DATE, | |
contact_type VARCHAR(30) | |
); | |
INSERT INTO | |
misc_part1 | |
VALUES | |
('michael', '2022-09-09', 'email'), | |
('elizabeth', '2022-01-23', 'sms'), | |
('david', NULL, 'sms'), | |
('linda', NULL, 'phone_call'), | |
('william', '2002-01-28', 'postal_mail'), | |
('barbara', '2019-12-01', 'email'), | |
('richard', '2022-08-29', NULL), | |
('susan', '2020-09-20', NULL); | |
DROP TABLE IF EXISTS misc_part2; | |
CREATE TEMPORARY TABLE misc_part2 ( | |
name VARCHAR(30), | |
last_contacted DATE, | |
contact_type VARCHAR(30) | |
); | |
INSERT INTO | |
misc_part2 | |
VALUES | |
('joseph', '2016-08-01', 'phone_call'), | |
('elizabeth', '2022-01-23', 'sms'), | |
('david', NULL, 'sms'), | |
('sarah', '2021-09-13', NULL), | |
('thomas', '2008-01-18', 'sms'), | |
('jessica', '2013-04-17', 'email'), | |
('charles', '2022-08-24', NULL), | |
('lisa', NULL, 'postal_mail'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment