Hopefully someone with Drupal 7 experience can point me in the right direction.
I'm creating a custom module to query some nodes and group and sort them by their field values.
I tried to use Views but it seems that it's not possible to get the results in the format I need so I've decide to query the database directly and build my own output.
What's the easiest way to query nodes in Drupal 7 as I notice there is a table for every field now which would seem to make any query that I have to write extremely complex?
Are there any methods to query node data and filter/group the results or can it only be done using raw SQL.
If the latter can you show me an example query that includes Drupal 7 Field values?