我使用下面的查询
SELECT SS.sightseeingId AS 'sID'
, SS.SightseeingName
, SS.displayPrice AS 'Price'
, SST.fromDate
FROM tblSightseeings SS INNER JOIN
tblSightseeingTours SST ON SS.sightseeingId = SST.sightseeingId
WHERE SS.isActive = 1 AND SS.isDisplayOnMainPage = 1
并得到这样的结果
sID | SightseeingName | Price | fromDate
------------------------------------------------------------------------------
2 | Dinner Cruise Bateaux London (Premier) | 40 | 2009-04-01 00:00:00.000
2 | Dinner Cruise Bateaux London (Premier) | 40 | 2009-12-29 00:00:00.000
30 | Jack The Ripper, Ghosts and Sinister | 35.1 | 2009-04-01 00:00:00.000
30 | Jack The Ripper, Ghosts and Sinister | 35.1 | 2009-10-01 00:00:00.000
40 | Grand Tour of London | 0 | 2009-05-01 00:00:00.000
40 | Grand Tour of London | 0 | 2010-05-01 00:00:00.000
87 | Warwick, Stratford, Oxford and The | 25 | 2009-04-01 00:00:00.000
87 | Warwick, Stratford, Oxford and The | 25 | 2009-11-01 00:00:00.000
我想显示的唯一的记录2一次30一次40一次。 重复的记录是由于SST.fromDate
。
如何纠正我的查询?