fix login_otp. postgres group by column inference doesn't work since cte doesn't have original table's primary key https://stackoverflow.com/a/50606823/ https://dba.stackexchange.com/a/195105

Created by  boogerlad  on July 22, 2020
X3DVBHKNONHWE7NRRQ6FXXA6GRJ3P4NHROO547IEGSBJAA5CM5UAC
Change contents