title: How to select the SQL database values that has the same name and sum up their corresponded values
body: <p><a href="https://i.stack.imgur.com/yZbuZ.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>I want to add all the liters of the cattle that is named Camel without getting interrupted by other Cattle catagories ,... Anyone can help.. this is for a <strong>c# project</strong> though </p>
  
  <pre><code>con.Open();
  SqlDataAdapter sda = new SqlDataAdapter(
  "insert into NewMilk(ProviderName,Cattle,Liter,[Price/liter],Salary,Date) values('" +
      txtNewMilkName.Text + "', '" + txtNewMilkCattle.Text + "', '" + 
      txtNewMilkLiter.Text + "', '" + txtNewMilkPrice.Text + "', '" +
      txtNewMilkSalary.Text + "', '" + label11.Text + "')", con);
  sda.SelectCommand.ExecuteNonQuery();
  con.Close();
  
  MessageBox.Show("Data is Saved Succesfully...!");
  txtNewMilkName.Clear();
  txtNewMilkCattle.Clear();
  txtNewMilkLiter.Clear();
  txtNewMilkPrice.Clear();
  txtNewMilkSalary.Clear();
  </code></pre>
  
  <p>i added to the database using this code but i want to retrieve all the Value of the Liters that has found in One of the cattle Names ...</p>
  
  <p>forexample if i want the the total sum of the the cattle that has been saved under the cattle name cow then i can only add the values of the row liters under cow ,... </p>