Hi,
I have a table named "Lisensoversikt" where I have the following items.
Second column shows product number:
I would like to create a query to return "Aktivitet", "Antall lisenser" og "Dato fra" with the highest date-value. In the example above I would have seen ID 2 = 125 since 26.10.2017 is newer than 25.10.2017.
I have created this query:
The SQL returns the following code:
How can I write this to only show the "Aktivitet" with highest date-value?
I have a table named "Lisensoversikt" where I have the following items.
Second column shows product number:
I would like to create a query to return "Aktivitet", "Antall lisenser" og "Dato fra" with the highest date-value. In the example above I would have seen ID 2 = 125 since 26.10.2017 is newer than 25.10.2017.
I have created this query:
The SQL returns the following code:
Code:
SELECT Lisensoversikt.Aktivitet, dbo_Aktivitet.AKTIVITET, Lisensoversikt.[Antall lisenser], Lisensoversikt.[Dato fra]
FROM Lisensoversikt INNER JOIN dbo_Aktivitet ON Lisensoversikt.Aktivitet = dbo_Aktivitet.AKTIVITETSNR
ORDER BY Lisensoversikt.Aktivitet;
How can I write this to only show the "Aktivitet" with highest date-value?