Query
Plugins for views queries.
Query plugins generate and execute a built query object against a particular storage backend, converting the Views query object into an actual query. Although query plugins need not necessarily use SQL, most other handler plugins that affect the query (fields, filters, etc.) implicitly assume that the query is using SQL.
Query plugins extend \Drupal\views\Plugin\views\query\QueryPluginBase. They must be annotated with \Drupal\views\Annotation\ViewsQuery annotation, and they must be in namespace directory Plugin\views\query.