title: How would I do this MySQL query in C#?
body: <p>I have 3 tables: KeyWords, GrantsKeyConn, Grants. The way it is set up, each "grant" has associated "keywords", which are stored in the KeyWords table as such:</p>
  
  <p><img src="https://i.stack.imgur.com/ABN8I.jpg" alt="KeyWords Table"></p>
  
  <p>Each "keyword" is associated/connected to a specific "grant" in the GrnatsKeyConn table as such:</p>
  
  <p><img src="https://i.stack.imgur.com/jf4e7.jpg" alt="GrantsKeyConn Table"></p>
  
  <p>... so that multiple "keywords" can be associated/connected to one "grant". Finally, each "grant" is stored in the Grants table as such:</p>
  
  <p><img src="https://i.stack.imgur.com/y848J.jpg" alt="Grants Table"></p>
  
  <p>I'm trying to filter out grants by specifying keywords in a textbox. So, say I specify the keywords "test, new, final"... then the result would filter out only grants that have those keywords associated with them; it doesn't have to result in grants that only have the 3 keywords associated with them; it can result in grants that have 1, 2, 3, ..., all of the keywords specified. <strong>In addition, if a grant has more than 1 keyword associated with it, I don't want it to show more than once in the results.</strong></p>
  
  <p>So how would I make this query? I don't want to do a select from KeyWords table to get ID of a keyword, then use that ID to go into the GrantsKeyConn table to get the associated grants, then go to the Grants table to extract the right grants. If so, how would I do this?</p>
  
  <p>Let me know if I need to further clarify my question.</p>