add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
9 rows affected
5 rows affected
user_id name following_id follower_id
2 USER NAME 2 1 2
3 USER NAME 3 1 3
4 USER NAME 4 1 4
5 USER NAME 5 1 5
user_id name following_id follower_id
1 USER NAME 1 2 1
3 USER NAME 3 2 3
4 USER NAME 4 2 4
user_id name following_id follower_id cnt
1 USER NAME 1 2 1 1
2 USER NAME 2 1 2 0
3 USER NAME 3 1 3 1
3 USER NAME 3 2 3 1
4 USER NAME 4 2 4 1
4 USER NAME 4 1 4 1
5 USER NAME 5 1 5 0
follower_id following_id name is_follower
2 1 USER NAME 2 f
3 1 USER NAME 3 t
4 1 USER NAME 4 t
5 1 USER NAME 5 f