your Query running well
Select video_id,play_mode,play_count from video_tbl
where play_count=(select min(play_count)from video_tbl where play_mode !='before' group by play_count )
the output of this query is
video_id play_mode play_count
15 both 2
16 after 2
18 both 2
19 after 2