Created
November 10, 2015 09:20
-
-
Save brandonweeks/b8a5f281cbce118724fa 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
BEGIN; | |
DELETE | |
FROM nics | |
WHERE identifier LIKE 'tap%' | |
OR identifier LIKE 'qv%' | |
OR identifier LIKE 'qbr%'; | |
DELETE | |
FROM fact_values | |
WHERE fact_name_id IN (SELECT id | |
FROM fact_names | |
WHERE name LIKE '%_tap%' OR name LIKE '%qv_%' OR name LIKE '%_qbr'); | |
DELETE | |
FROM fact_names | |
WHERE id NOT IN (SELECT DISTINCT fact_name_id | |
FROM fact_values); | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment