Pregunta de entrevista de Thomson Reuters

How do you convert stack to queue? SQL query to find the peak element.