Bold of you to assume it was automated. The process I used was tmux with pane synchronization.

I asked to automate it (probably would've just been a shell script, _maybe_ Python, issuing SQL commands to stdin), but people were afraid of unknown unknowns.