Get your taxes done using TurboTax

I read the  wash sale rule that says: you sell at a loss and within 30 days you bought back at cheaper price is  Wash Sale.

Does that mean "Sell" need to come first before you buy them back within 30 days?

Will this be a Wash Sale if I bought XZY on 3 occasions,  each time is within 30 days from the previous purchase. Then I sell the first purchase within 30 days of my last (3rd) purchase at a loss?