title: Ho to write Select query for EAV - Entity Attribute Value model
body: <p>I have following schema. In which </p>
  
  <ul>
  <li><code>Types</code> represent DB Table </li>
  <li><code>TypeProperty</code> represents Column of Table</li>
  <li><code>TypeRow</code> represent Row of table</li>
  </ul>
  
  <p>I want to write a select query to which I will pass single <code>Type</code> and it should give me all its <code>TypeProperty</code>, <code>TypeRow</code> and <code>TypeValue</code> that are associated with these <em>Properties</em> and <em>Rows</em>.</p>
  
  <p>I will be showing this data in a web application in which user will select a <em>Type</em> from dropdown and application will get <em>Properties</em>, <em>Rows</em> and associated <em>values</em> and will show them as a complete grid.</p>
  
  <p><strong>I am using SQL Server 2014.</strong></p>
  
  <p>Can anyone help me please?</p>
  
  <p><a href="https://i.stack.imgur.com/KAihH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KAihH.png" alt="enter image description here"></a></p>