-- Database schema
| circuits : circuitId [ INT ] primary_key , circuitRef [ TEXT ] , name [ TEXT ] , location [ TEXT ] , country [ TEXT ] , lat [ INT ] , lng [ INT ] , alt [ INT ] , url [ TEXT ] | races : raceId [ INT ] primary_key , year [ INT ] , round [ INT ] , circuitId [ INT ] races.circuitId = circuits.circuitId , name [ TEXT ] , date [ TEXT ] , time [ TEXT ] , url [ TEXT ] | drivers : driverId [ INT ] primary_key , driverRef [ TEXT ] , number [ INT ] , code [ TEXT ] , forename [ TEXT ] , surname [ TEXT ] , dob [ TEXT ] , nationality [ TEXT ] , url [ TEXT ] | status : statusId [ INT ] primary_key , status [ TEXT ] | seasons : year [ INT ] primary_key , url [ TEXT ] | constructors : constructorId [ INT ] primary_key , constructorRef [ TEXT ] , name [ TEXT ] , nationality [ TEXT ] , url [ TEXT ] | constructorStandings : constructorStandingsId [ INT ] primary_key , raceId [ INT ] constructorStandings.raceId = races.raceId , constructorId [ INT ] constructorStandings.constructorId = constructors.constructorId , points [ INT ] , position [ INT ] , positionText [ TEXT ] , wins [ INT ] | results : resultId [ INT ] primary_key , raceId [ INT ] results.raceId = races.raceId , driverId [ INT ] results.driverId = drivers.driverId , constructorId [ INT ] results.constructorId = constructors.constructorId , number [ INT ] , grid [ INT ] , position [ INT ] , positionText [ TEXT ] , positionOrder [ INT ] , points [ INT ] , laps [ INT ] , time [ TEXT ] , milliseconds [ INT ] , fastestLap [ INT ] , rank [ INT ] , fastestLapTime [ TEXT ] , fastestLapSpeed [ TEXT ] , statusId [ INT ] | driverStandings : driverStandingsId [ INT ] primary_key , raceId [ INT ] driverStandings.raceId = races.raceId , driverId [ INT ] driverStandings.driverId = drivers.driverId , points [ INT ] , position [ INT ] , positionText [ TEXT ] , wins [ INT ] | constructorResults : constructorResultsId [ INT ] primary_key , raceId [ INT ] constructorResults.raceId = races.raceId , constructorId [ INT ] constructorResults.constructorId = constructors.constructorId , points [ INT ] , status [ INT ] | qualifying : qualifyId [ INT ] primary_key , raceId [ INT ] qualifying.raceId = races.raceId , driverId [ INT ] qualifying.driverId = drivers.driverId , constructorId [ INT ] qualifying.constructorId = constructors.constructorId , number [ INT ] , position [ INT ] , q1 [ TEXT ] , q2 [ TEXT ] , q3 [ TEXT ] | pitStops : raceId [ INT ] primary_key pitStops.raceId = races.raceId , driverId [ INT ] pitStops.driverId = drivers.driverId , stop [ INT ] , lap [ INT ] , time [ TEXT ] , duration [ TEXT ] , milliseconds [ INT ] | lapTimes : raceId [ INT ] primary_key lapTimes.raceId = races.raceId , driverId [ INT ] lapTimes.driverId = drivers.driverId , lap [ INT ] , position [ INT ] , time [ TEXT ] , milliseconds [ INT ] |
-- -- What are the names and years of all races that had a driver with the last name Lewis?

SELECT T2.name ,  T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = "Lewis";