I need to design a query that will use the following tables:
CommunityElevation:
communityModelID
communityID
elevationID
baseprice
Community:
communityID
name
Elevation:
elevationID
elevationName
modelID
Model:
modelID
modelName
This database, in part, describes a home builder's communities, models, and model elevations. These relate to each other in the following way:
-each community has multiple models
-each model has multiple elevations
-different communities can contain the same models/elevations
-each elevation has it's own baseprice depending on in which community it is located. That is the purpose of the communityElevation table.
My query needs to produce 1 row for each model/community (NOT elevation/community) pairing with the lowest possible baseprice for that pairing (i.e. lowest baseprice in communityElevation for a specific model and community).
Does this make sense? Is it possible?
Thanks for your help in advance.
CommunityElevation:
communityModelID
communityID
elevationID
baseprice
Community:
communityID
name
Elevation:
elevationID
elevationName
modelID
Model:
modelID
modelName
This database, in part, describes a home builder's communities, models, and model elevations. These relate to each other in the following way:
-each community has multiple models
-each model has multiple elevations
-different communities can contain the same models/elevations
-each elevation has it's own baseprice depending on in which community it is located. That is the purpose of the communityElevation table.
My query needs to produce 1 row for each model/community (NOT elevation/community) pairing with the lowest possible baseprice for that pairing (i.e. lowest baseprice in communityElevation for a specific model and community).
Does this make sense? Is it possible?
Thanks for your help in advance.