-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtrimdb.sql
More file actions
18 lines (14 loc) · 821 Bytes
/
trimdb.sql
File metadata and controls
18 lines (14 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
create view lonely_words as
select id_word from word_count where count = 1 group by id_word;
select * from lonely_words;
select count(*) from word_conditional_probability;
select count(*) from word_conditional_probability where id_word in lonely_words;
delete from word_conditional_probability where id_word in lonely_words;
select count(*) from word_category;
select count(*) from word_category where id_word in lonely_words;
delete from word_category where id_word in lonely_words;
select count(*) from word_count;
select count(*) from word_count where id_word in lonely_words;
delete from word_count where id_word in lonely_words;
select count(*) from word where word.id not in (select id_word from word_count group by id_word);
delete from word where id not in (select id_word from word_count group by id_word);