title: Force split SQL request
body: <p>I'm stuck with an SQL problem here : </p>
  
  <pre><code>tab = ["medium", "good", "excellent", "mother_tongue"]
  
  users = User.joins(:spoken_languages).where("language = 'FR' and level in (?)", tab).count
  </code></pre>
  
  <blockquote>
    <p>SELECT COUNT(*) 
        FROM "users" INNER JOIN "spoken_languages" 
        ON "spoken_languages"."languageable_id" = "users"."id"
        AND "spoken_languages"."languageable_type" = 'User' 
        WHERE (language = 'FR' and level in ('medium','good','excellent','mother_tongue'))</p>
  </blockquote>
  
  <pre><code>users.joins(:spoken_languages).where("language = 'NL' and level in (?)", tab)
  </code></pre>
  
  <blockquote>
    <p>SELECT COUNT(*) 
        FROM "users"
        INNER JOIN "spoken_languages"
        ON "spoken_languages"."languageable_id" = "users"."id"
        AND "spoken_languages"."languageable_type" = "User"
        WHERE (language = 'FR' and level in ('medium','good','excellent','mother_tongue')) 
        AND (language = 'NL' and level in ('medium','good','excellent','mother_tongue'))</p>
  </blockquote>
  
  <p>I don't want rails to check this column simultaneously but separately.</p>
  
  <p>Firstly check French users with required level then in this list Dutch users with required list</p>
  
  <p>Here, rails is looking for users with a languages record 'FR' AND 'NL'. A language record is only NL Or FR not both.</p>