In this tutorials i going to explain how to write the custom queries in drupal 7. The most common style of question in Drupal could be a static question. A static question is one which will be passed to the info nearly verbatim.

solely choose queries is also static. Below is the example that shows easy way of writing your custom queries :

Drupal 7 query structure with join

d-queries