The following script, when copied into Toad 12.5 Editor, causes Toad to hang, and never get a chance to execute it. Simply copying it in causes Toad to freeze. The parenthesis before the upper command should not be there, and when removed, the script does not hang. In Toad 12.6, copying the script does not freeze Toad, but running it using F9 will hang Toad.
select distinct lower(b.gobeacc_username)||'@lccc.edu',b.gobeacc_username,gorpaud_pin,gorpaud_pidm from gorpaud a,gobeacc b where gorpaud_pidm = gobeacc_pidm and gorpaud_pidm in (select gobeacc_pidm from gobeacc c where c.gobeacc_username
in (upper('wbarron'),
(upper('cdoll'),
(upper('rgerman'),
(upper('lmesics'),
(upper('jthompson'),
(upper('rwilt')))
and gorpaud_activity_date = (select max(gorpaud_activity_date) from gorpaud b where b.gorpaud_pidm = a.gorpaud_pidm)
and gorpaud_pin is not null
order by gobeacc_username