$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection('MagentoFrameworkAppResourceConnection::DEFAULT_CONNECTION');
$results = $connection->fetchone($query);