mariadb cnn, query