我有一张名为 RELEASE 的表:
*Country, Album, Date_year, Date_month, Date_day*
Italy Z 1940 2 27
Italy Y 1992 11 22
Italy X 1940 1 20
Italy R 1998 null null
France W 1944 9 18
UK L 1989 8 21
UK P 1970 10 1
Germany E 2002 null null
我需要指定一个 SQL 查询,其中包含专辑名称、国家名称和最旧专辑的日期(年、月、日)。
(如果月和日的值为空也可以)
我不能使用LIMIT、OFFSET、ROWNUM ...我只能使用标准 SQL 结构。
我尝试进行此查询,但不正确:
SELECT country, album, min(date_year), min(date_month), min(date_day)
FROM release
结果将是:
*Country, Album, Date_year, Date_month, Date_day*
Italy X 1940 1 20
我该如何解决?谢谢