CREATE TABLE table_name_22 (year INT, opponent VARCHAR)

what year was the opponent caroline garcia?
SELECT SUM(year) FROM table_name_22 WHERE opponent = "caroline garcia"
SELECT SUM("year") FROM "table_name_22" WHERE "caroline garcia" = "opponent"