Hi
I'm trying to create a view containing 3 fields, all from the same table.
Here's what I have:
Basically I want the highest dateField for each field2, and then just add the corresponding field3 next to it. But this query doesnt give me unique values for field2
If I leave the field3 out of the query as follows:
then I get unique field2 values, but i dont have the corresponding field3 value.
How should I rewrite this query to achieve what i'm trying to?
Thanks
I'm trying to create a view containing 3 fields, all from the same table.
Here's what I have:
Code:
SELECT MAX(dateField), field2, field3 FROM table1 GROUP BY field2, field3
If I leave the field3 out of the query as follows:
Code:
SELECT MAX(dateField), field2 FROM table1 GROUP BY field2
How should I rewrite this query to achieve what i'm trying to?
Thanks
Comment