Mysql 分组,显示最小值

Mysql 分组,显示最小值,mysql,sql,Mysql,Sql,我通过以下查询获取标题列表: select title, date from financials, order by title, date title date 1,000 Times More Brutal 2013-06-01 1,000 Times More Brutal 2013-07-01 1,000 Times More Brutal 2013-07-01 1,000 Times More Brutal 2013

我通过以下查询获取标题列表:

select 
  title, 
  date 
from 
  financials,
order by 
title, date

title                       date
1,000 Times More Brutal 2013-06-01
1,000 Times More Brutal 2013-07-01
1,000 Times More Brutal 2013-07-01
1,000 Times More Brutal 2013-07-01
1,000 Times More Brutal 2013-08-01
1,000 Times More Brutal 2013-09-01
1,000 Times More Brutal 2013-09-01
1,000 Times More Brutal 2013-09-01
1,000 Times More Brutal 2013-09-01
1,000 Times More Brutal 2013-10-01
1,000 Times More Brutal 2013-10-01
1,000 Times More Brutal 2013-10-01
11'e 10 Kala            2012-12-01
11'e 10 Kala            2012-12-01
11'e 10 Kala            2012-12-01
11'e 10 Kala            2012-12-01
11'e 10 Kala            2013-01-01
我需要对标题进行分组,然后获取交易的最小值(日期)。正确的查询将产生:

title                   date 
1,000 Times More Brutal 2013-06-01
11'e 10 Kala            2012-12-01

我如何使用GROUP BY查询在此处获取最小日期?

我不需要在此处添加子选择项?@David542不,这应该可以解决其他两个问题:现在,当使用GROUP BY处理多个列时,一个很好的技巧是写数字来引用列而不是名称<代码>从financials GROUP BY 1选择标题,分钟(日期)@Martin这是一个技巧,但我不建议这样做,如果您更改查询,很容易忘记更新。即使不更改查询,这也是一个坏习惯,因为如果表列也发生更改,那么将查询与select*一起使用可能会导致错误。这是可行的,但对我来说太冒险了。通常一个人至少应该对自己诚实,是吗?
SELECT title, MIN(date)
FROM financials
GROUP BY title
ORDER BY title
select title, min(date)
from financials
group by title
order by title, date
SELECT title, MIN(date) 
FROM financials
GROUP BY title
select title, min(date) from financials group by title order by title