title: How do I create a SQL query that can filter on count?
body: <p>Short database description "Ships":</p>
  
  <p>The database of naval ships that took part in World War II is under consideration. The database has the following relations:</p>
  
  <ul>
  <li>Classes(class, type, country, numGuns, bore, displacement)</li>
  <li>Ships(name, class, launched)</li>
  <li>Battles(name, date)</li>
  <li>Outcomes(ship, battle, result)</li>
  </ul>
  
  <p>Ships in classes are arranged to a single project. A class is normally assigned the name of the first ship in the class under consideration (head ship); otherwise, the class name does not coincide with any ship name in the database.</p>
  
  <p>The Classes relation includes the class name, type (bb for a battle ship, or bc for a battle cruiser), country where the ship was built, number of main guns, gun caliber (diameter of the gun barrel, in inches), and displacement (weight in tons). </p>
  
  <p>The Ships relation includes the ship name, its class name, and launch year. The Battles relation covers the name and date of a battle the ships participated; while the result of their participation in the battle (sunk, damaged, or unharmed - OK) is in the Outcomes relation. Note: the Outcomes relation may include the ships not included in the Ships relation.</p>
  
  <p>Point out the battles in which at least three ships from the same country took part. </p>
  
  <p>Can someone help with this query? I haven't used SQL for quite a while.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>As I was told it's not allowed to ask for a broad question, I'll be more specific :</p>
  
  <p>I thought about how I can do it, but eventually I need some kind of way to count duplicates?
  for exmaple..for the list</p>
  
  <p>if I'll say count > 2 I'll get a and c</p>
  
  <p>Name
  a
  a
  b
  a
  b
  a
  c
  c
  c</p>