CREATE TABLE table_51247 ("Team" TEXT, "Games Played" FLOAT, "Wins" FLOAT, "Losses" FLOAT, "Ties" FLOAT, "Goals For" FLOAT, "Goals Against" FLOAT)

What has the lowest number of wins with GA smaller than 39, more than 2 losses, and ties greater than 0?
SELECT MIN("Wins") FROM table_51247 WHERE "Goals Against" < '39' AND "Losses" > '2' AND "Ties" > '0'
SELECT MIN("Wins") FROM "table_51247" WHERE "Goals Against" < '39' AND "Losses" > '2' AND "Ties" > '0'