Query editor
-- BTC calendar-year return: first to last hourly price within each year (close-to-close); current year = YTDSELECT year(timestamp) AS year,max_by(price, timestamp) / min_by(price, timestamp) - 1 AS return_2011FROM prices.hourWHERE blockchain = 'bitcoin' AND symbol = 'BTC'AND timestamp >= TIMESTAMP '2011-01-01'GROUP BY 1ORDER BY 1