Fix SQL in playback_history