CREATE TABLE table_name_3 (value__ INT, rank VARCHAR, revenue__$m_ VARCHAR, team VARCHAR)

What was the sum of Value ($M), when the Revenue ($M) was less than 307, the Team was Valencia, and the Rank was smaller than 19?
SELECT SUM(value__) AS $m_ FROM table_name_3 WHERE revenue__$m_ < 307 AND team = "valencia" AND rank < 19
SELECT SUM("value__") AS $m_ FROM "table_name_3" WHERE "rank" < 19 AND "revenue__$m_" < 307 AND "team" = "valencia"