What is the proper syntax for a mysql-java statement such as this one ?
PreparedStatement st =connection.prepareStatement("SELECT Name, Value, Quantity FROM sales if (type=='Purchase' AND state=='confirmed') OR (type=='Sale' AND state=='not confirmed')) ;