Added queue queries to database