I have a dataset with many fields. I am trying to summarize the "price" data by averages for year ranges. For example:

* 1900 to 1925: "average price"
* 1925 to 1950: "average price"
* 1950 to 1975: "average price"
* 1975 to 2000: "average price"
* 2000 to 2017: "average price"

Tried:

```
proc sql;
select avg(price) as avg_price
FROM summary
WHEN year between 1995 and 2000;
quit;

```

The code above did not work. Can you please help me with the code (please add to proc and quit or anything else I need, I am new to SAS/SQL)

[enter image description here](https://i.stack.imgur.com/HRtRQ.png)