title: Selecting "ALL" in a query using a list of variables
body: <p>My first (simplified) script mysql_script.sh is:</p>
  
  <pre><code>#!/bin/bash
  /usr/bin/mysql --password=**** --database=mydb&lt;&lt;EOMYSQL
  SELECT SUM(usd) FROM mytable WHERE country=$VAR
  INTO OUTFILE "oufile_$VAR.txt" FIELDS TERMINATED BY ';';
  EOMYSQL
  </code></pre>
  
  <p>The first script is called from the second one:</p>
  
  <pre><code>#!/bin/bash
  list=( 30 50 60 )
  for L in "${list[@]}"
  do
    VAR=${L} ./mysql_script.sh
  done
  </code></pre>
  
  <p>It works fine, but now I need to get a 4th query with the results for <code>$VAR=*</code>, or <code>$VAR=30 or 50 or 60</code>. As VAR is the code of every country in my DB, I need the value of SUM(usd) for "all countries".
  How can I express that?</p>
  
  <p>I tested <code>'%%'</code> and <code>'*'</code> without success.</p>
  
  <p>Thanks,</p>
  
  <hr>
  
  <p>EDITED for (I hope) better understanding</p>