How to use Group By with AND in java codes <p>Trying to get values from my table but having problem with my snytaxes</p> <p>there is wrong type with "Group By" usage with "AND" any help will be apriciated</p> <pre><code>"SELECT " + C_CINSIYET + " FROM " + TABLE_COMPANYS + " WHERE " + C_MARKA + " = '" + companyMarka.getComp_marka() + "'" + " AND " + C_FIRMA + " = '" + companyMarka.getComp_name() + "' GROUP BY " + C_CINSIYET + "AND"+C_FIRMA; </code></pre>