相同属性中查询符合条件的记录,怎样写SQL语句?
销售单号 日期 产品编码 价格 报价日期 天数so001 2011-07-12 00:00:00.000 JD001 5.500000 2011-07-01 00:00:00.000 11
so002 2011-08-12 00:00:00.000 JD001 5.500000 2011-07-01 00:00:00.000 42
so002 2011-08-12 00:00:00.000 JD001 5.300000 2011-08-01 00:00:00.000 11
so003 2011-09-12 00:00:00.000 JD001 5.500000 2011-07-01 00:00:00.000 73
so003 2011-09-12 00:00:00.000 JD001 5.300000 2011-08-01 00:00:00.000 42
so003 2011-09-12 00:00:00.000 JD001 5.600000 2011-09-01 00:00:00.000 11
当销售单号与产品编码相同时,取天数小的记录,请问这样的查询语句怎样写呀?