1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| SELECT
ShowroomStatus,
ShowroomCustomer,
ShowroomOfferDate,
PictureAddress AS Address,
ShowroomStyleSystem,
(
SELECT COUNT(ShowroomStyleOwn)
FROM GetPictureShowroomOfferedTo
WHERE ShowroomStyleOwn < ShowroomStyleOwn
) +1 AS Rank,
ShowroomStyleOwn,
ShowroomSelectionDate,
ShowroomDepartment,
ShowroomBuyer
FROM GetPictureShowroomOfferedTo
WHERE
ShowroomStatus = "Offered"
AND ShowroomCustomer = Forms("Welcome").WhichCustomerShowroom]
AND ShowroomPictureRank = 1
ORDER BY
ShowroomStyleOwn; |