extract temp in query