J'utilise la requête suivanteSuppression de doublons
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
et obtenir tel résultat
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
Je veux afficher les enregistrements uniques 2 une fois 30 une fois 40 fois. Les enregistrements en double sont dus à SST.fromDate
.
Comment corriger ma requête ??
quelle date souhaitez-vous afficher? – Josh
Date la plus récente – Waheed