MySQL - alternatives to nested subqueries when limiting aggregate data in a correlated subquery
问题 I have a table that looks something like this: DataTable +------------+------------+------------+ | Date | DailyData1 | DailyData2 | +------------+------------+------------+ | 2012-01-23 | 146.30 | 212.45 | | 2012-01-20 | 554.62 | 539.11 | | 2012-01-19 | 710.69 | 536.35 | +------------+------------+------------+ I'm trying to create a view (call it AggregateView ) that will, for each date and for each data column, show a few different aggregates. For example, select * from AggregateView where