Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Views SQL Twig Fields

Security covered Under active development 39 sites

Part of the Views ecosystem · 280 projects

This module allows you to use SQL expressions within Drupal Views for fields, filters, sorts, and arguments. It leverages Twig templating for more powerful and flexible custom queries, enabling complex computations and direct SQL input.

This module uses twig to support SQL expressions for fields, filters, sorts and arguments. Users can also enter SQL expressions directly. Twig support allow more powerful computation to be performed. It can also be used to provide raw SQL expressions.

SQL Support

This project supports SQL customized:

  • Fields
  • Filters
  • Sorts
  • Arguments
  • Relationships (using an optional module)

Notes

Use of Twig and SQL provides more flexibility but it requires an understanding of both to be used effectively. It is relatively easy to implement simple extensions such as aggregating/summing a Twig SQL field that compares another field to some value such as a cost greater than 100. Some checks are provided to limit any problems and assist in debugging but it is good practice to keep backups of a view before and after adding SQL changes. You have been warned.

Drupal 8–11

Ask your assistant about Views SQL Twig Fields

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
10
Tracked since
May 2023
Latest release
8 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
1.1.1 Stable 8–11 Feb 11, 2026
1.1.0 Stable 8–11 Jun 2, 2024
1.0.0 Stable 8–10 Jul 23, 2023
1.0.0-beta5 Pre-release 8–10 Jun 6, 2023
1.0.0-beta4 Pre-release 8–10 Jun 2, 2023
1.0.0-beta3 Pre-release 8–10 Jun 1, 2023
1.0.0-beta2 Pre-release 8–10 Jun 1, 2023
1.0.0-beta1 Pre-release 8–10 May 2, 2023
1.0.x-dev Dev 8–11 May 2, 2023
1.x-dev Dev 8–10 May 2, 2023