What is the total number of goals when there are 3 draws, more than 18 losses, and played is smaller than 38?
CREATE TABLE table_name_40 (
    goals_for VARCHAR,
    played VARCHAR,
    draws VARCHAR,
    losses VARCHAR
)
SELECT COUNT(goals_for) FROM table_name_40 WHERE draws = 3 AND losses > 18 AND played < 38
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total number of goals when there are 3 draws, more than 18 losses, and played is smaller than 38? ### Input: CREATE TABLE table_name_40 (
    goals_for VARCHAR,
    played VARCHAR,
    draws VARCHAR,
    losses VARCHAR
) ### Response: SELECT COUNT(goals_for) FROM table_name_40 WHERE draws = 3 AND losses > 18 AND played < 38