By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
id | title |
---|---|
0 | titleA |
1 | titleB |
2 | titleC |
id | id_post | text |
---|---|---|
1 | 0 | blaa |
2 | 0 | blbb |
3 | 1 | aaaa |
4 | 1 | bbbb |
id | id_comment | vote |
---|---|---|
1 | 1 | 1 |
2 | 1 | 1 |
3 | 1 | 1 |
4 | 1 | 1 |
5 | 1 | 1 |
6 | 1 | -1 |
7 | 1 | 1 |
8 | 2 | 7 |
9 | 3 | 5 |
10 | 3 | 5 |
11 | 4 | 1 |
12 | 4 | 1 |
13 | 4 | 1 |
post_id | comment_id | total_like_votes |
---|---|---|
0 | 2 | 7 |
1 | 3 | 10 |