Port admin over to tidy sql