I have a table that have 2 types of data:

  • first type is '1'
  • second type is '2'

And I want to get 3 records of both by union so, I want to know that how to get 3 records of both types from one table at a time so it is possible by union with itself so i want to add union with my views content.

How to get query of view and alter it and where I put this query in Drupal 7 but I have no one module for this data.

1 Answer 1


You can look here (https://drupal.org/node/409808) for information on creating custom sql statements in a View.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.