Changing the SQL queries generated by views

"The next two options, Use aggregation and Query settings, are pretty complex and change the very heart of Views—the SQL queries it generates. As I've said before, Views is a report writer for Drupal. As Drupal allows structured data (thanks to fields), it stores its data in a database, and not all content management systems do this, you can take this data and use SQL queries to create the many different kinds of displays you've been building. And for most Views users, they will never need to know any SQL; Views will do it for you.

Of course, professional programmers scoff at the SQL queries generated by Views. It has to make a lot of assumptions, so it doesn't always generate the most efficient SQL queries ...

Get Mastering Drupal 8 Views now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.