Added quiry to database