Abaixo está uma instrução que descreve uma tarefa de geração de SQL, combinada com uma entrada que fornece mais contexto sobre os esquemas de tabela disponíveis. Escreva o código SQL que responda adequadamente à solicitação
 ###Instrução: Qual é o valor médio das bolsas de pesquisa concedidas ao departamento de Física nos últimos 3 anos?
 ###Tabelas: 
CREATE TABLE ResearchGrants (GrantID int, Department varchar(50), Amount decimal(10,2), Year int); INSERT INTO ResearchGrants (GrantID, Department, Amount, Year) VALUES (1, 'Physics', 50000, 2020); INSERT INTO ResearchGrants (GrantID, Department, Amount, Year) VALUES (2, 'Physics', 75000, 2019); INSERT INTO ResearchGrants (GrantID, Department, Amount, Year) VALUES (3, 'Chemistry', 100000, 2020); INSERT INTO ResearchGrants (GrantID, Department, Amount, Year) VALUES (4, 'Chemistry', 120000, 2019); INSERT INTO ResearchGrants (GrantID, Department, Amount, Year) VALUES (5, 'Chemistry', 80000, 2018); INSERT INTO ResearchGrants (GrantID, Department, Amount, Year) VALUES (6, 'Chemistry', 90000, 2017); INSERT INTO ResearchGrants (GrantID, Department, Amount, Year) VALUES (7, 'Chemistry', 70000, 2016); INSERT INTO ResearchGrants (GrantID, Department, Amount, Year) VALUES (8, 'Physics', 60000, 2018); INSERT INTO ResearchGrants (GrantID, Department, Amount, Year) VALUES (9, 'Physics', 40000, 2017);
SELECT AVG(Amount) FROM ResearchGrants WHERE Department = 'Physics' AND Year BETWEEN (SELECT MAX(Year) FROM ResearchGrants) - 2 AND (SELECT MAX(Year) FROM ResearchGrants);