querying content type via drupal database API Using Drupal 7 I have created a content type called 'fauna'. I simply want to filter by an attribute (eg: 'area') using Drupal database API.

As far as I have seen around, most of people follow queries like...

$query = db_select('my_table_name')

applying then some filters.

But I have no table at all regarding my content type where I could apply these filters, i just have a bunch of tables field_data_field_fauna_name, field_data_field_fauna_area ... (these are the fields defined for my Content type).
Instead of querying directly against a table you can use Entity field query. 

I'll assume the machine name of your content type is called fauna and that there is a field called field_fauna_area. Now lets find all nodes where the field field_fauna_area is "Europe".

$query = new EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'node')
  -&gt;entityCondition('bundle', 'fauna')
  -&gt;fieldCondition('field_fauna_area', 'value', 'Europe', '=')
$result = $query-&gt;execute();
if (isset($result['node'])) {
  $fauna_nids = array_keys($result['node']);
  $fauna_items = entity_load('node', $fauna_nids);
}


In $fauna_nids you will find all node ids and in $fauna_items all the nodes will be loaded.