CREATE TABLE appellations (No INT, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT)
CREATE TABLE grapes (ID INT, Grape TEXT, Color TEXT)
CREATE TABLE wine (No INT, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INT, Price INT, Score INT, Cases INT, Drink TEXT)

Sum the average prices of wines for different years, and bin year attribute into weekday interval for a bar chart, I want to list by the total number from high to low.
SELECT Year, SUM(AVG(Price)) FROM wine ORDER BY SUM(AVG(Price)) DESC
SELECT "Year", SUM(AVG("Price")) FROM "wine" ORDER BY SUM(AVG("Price")) DESC NULLS LAST