I am trying to execute a query in Extbase repository, but it is not return any result.

This is my syntax and if anybody knows the problem, please help.

In repository file;

```
public function getImages( $uidOfCE, $pid ) {

    $query = $this->createQuery(); 
    $query->statement('SELECT sf.identifier,sfm.title,sfr.description 
        FROM tt_content AS tc 
        LEFT JOIN sys_file_reference sfr ON sfr.`uid_foreign` = tc.uid 
        LEFT JOIN sys_file AS sf ON sf.`uid` = sfr.uid_local 
        LEFT JOIN sys_file_metadata AS sfm ON sfm.`file` = sf.uid 
        WHERE tc.uid = '.$uidOfCE.' 
        AND tc.pid='.$pid.' 
        AND tc.list_type = "myimage_gallery" 
        AND sfr.`deleted` = 0 AND sfr.`hidden`= 0  
        AND tc.`deleted` = 0 AND tc.`hidden`= 0  AND  tc.sys_language_uid ='.$GLOBALS['TSFE']->sys_language_uid.' 
        AND sfr.fieldname = "tx_myext_images" AND sfr.tablenames = "tt_content"');

    return $query->execute();
}

```

In controller:

```
$myimagegalleries = $this->myimagegalleryRepository->getImages(
$uidOfCE, $this->cObj->data['pid'] );

```

Is it possible to create custom queries in extbase repository?