Single value "db_query": How to SELECT value that related to the node
You should not use direct queries to the database tables used for fields, for the simple fact the fields could not use database tables to store their value; this is what happens by default, but if a different storage implementation is exposed by a module, the information will be saved in another place. That is actually what happens with the Mongodb module.

If you know the node ID, and you want to get the value of a field associated to it, you can use the following code.

$node = node_load($nid);
$values = field_get_items('node', $node, 'field_subscription_period');


$values is an array whose structure depends from the field. It contains at least an item, but the exact number depends from how many values the field can have. (It is normally set in the setting page for the field.)
To see the structure of that array, you should install the Devel module, and use test code similar to the following one.

$node = node_load($nid);
$values = field_get_items('node', $node, 'field_subscription_period');
dsm($values);


For example, the first screenshot shows the structure used for a node body, while the second one shows the structure used for an image field.





If you need to find all the nodes of a specific content type, and filter out the list basing on the value set for a field, you should use the EntityFieldQuery class, as in the following code.

$query = new EntityFieldQuery();

$query-&gt;entityCondition('entity_type', 'node')
  -&gt;entityCondition('bundle', 'yearly_rent')
  -&gt;propertyCondition('status', 1)
  -&gt;fieldCondition('field_subscription_period', 'value', $minimum_value, '&gt;')
  -&gt;addMetaData('account', user_load(1)); // Run the query as user 1.

$result = $query-&gt;execute();

if (!empty($result['node'])) {
  $nodes = node_load_multiple(array_keys($result['node']));
}


addMetaData('account', user_load(1)) is necessary because the EntityFieldQuery class respects the access permission associated with fields; if the current user doesn't have access to the field, fieldCondition() would fail.
Once you have the node object, you can use field_get_items(). If you want to obtain a value to render, you should call field_view_field().