title: How to find a table key with a certain option by knowing related values from another table
body: <p>So, there 2 tables:</p>
  <pre><code>object_table 
   - ot.id
   - ot.isActive
  </code></pre>
  <pre><code>object_attribute_table
   - oat.objId
   - oat.name
   - oat.descr
   - oat.value
  </code></pre>
  <p>Object may have several attributes.
  For example, there might be situation like this:</p>
  <pre><code>| objId | name  | descr | value  |
  |-------|-------|-------|--------|
  | 1     | name1 | desc1 | value1 |
  | 1     | name2 | desc2 | value2 |
  | 7     | name1 | desc1 | value1 |
  | 7     | name2 | desc2 | value2 |
  | 7     | name3 | desc3 | value3 |
  | 8     | name2 | desc3 | value1 |
  | 8     | name1 | desc2 | value3 |
  </code></pre>
  <p>So, how do I correctly find the active ID, by knowing only the attributes of the object, like</p>
  <pre><code>| name  | descr | value  |
  |-------|-------|--------|
  | name1 | desc1 | value1 |
  | name2 | desc2 | value2 |
  </code></pre>
  <p>?</p>