Skip to content
Advertisement

How can I find all Sites with latest date?

I am trying to add all areas of data that will show all latest pricing. Because there are two latest dates for specific locations, only 5/6 show up with a date of 5/27. I need one location to show up as well as the latest date for it is 5/26. EXAMPLE BELOW:

I currently have this query:

RESULTS:

I need SITE “A” to pull up as well since that is the latest price. It was just imported a day before.

Advertisement

Answer

You seem to be using SQL Server (or Sybase) instead of MySQL.

Try adding SITE to the GROUP BY if you need that to be included:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement