By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
id | user_id | note_id | subject_name | count(subject_name COLLATE utf8mb4_bin) over (partition by user_id, subject_name COLLATE utf8mb4_bin) |
---|---|---|---|---|
10 | 2 | UdMs870BSswp | CN | 2 |
12 | 2 | 8stMvslwIGr2 | CN | 2 |
13 | 2 | PB3KNbbFkaUm | cn | 1 |