I have a DE that lists of all ads on site.
That data includes, maker, model and listing price.
What I am trying to do is query out the following information:
- distinct model
- the min list price
- the max list price
I can query out model and make with no problem to a new DE...and get 20,008 records:
select DISTINCT b.[Listing_Model__c], b.[Listing_Make__c] From Web_Information__c_Salesforce as b
When I try to pull in the min and max values, it's not working. Here is what I have tried (I'm using the convert operator because the list price is set as a text not a numeric field):
select CONVERT(numeric,'MIN(b.Listing_Price__c)') as 'MinListPrice', CONVERT(numeric,'MAX(b.Listing_Price__c)') as 'MaxListPrice' From "Web_Information__c_Salesforce" as b INNER JOIN "FSBO-MakeModels" as c on b.[Listing_Make__c] = c.[Listing_Make__c] and b.[Listing_Model__c] = c.[Listing_Model__c]
It's only giving me 1 record... What I want is the min and max listing prices for those 20,008 different Make/Models.
Thanks for any assistance!