Which is a compound sentence?

 - Eli Whitney invented the cotton gin in 1793.
 - Long-distance runners need speed to win races, but they also need endurance.
The first sentence is the compound sentence. It is made up of two simple sentences joined by a comma and the conjunction but.
Long-distance runners need speed to win races, but they also need endurance.