Kann einer diese Query von MySQL in Access umwandeln?

Skittle

Grünschnabel
Hallo!

Es geht um diese Query:

SELECT COUNT(DISTINCT tabelle.datum) as Anzahl, RIGHT(tabelle.datum,4) as Jahr from tabelle GROUP BY Jahr;

Wäre super, wenn das einer wüsste.

Danke!
 
Vielen Dank für die Antwort erstmal.

Es ist so, dass Access ein Problem mit dem DISTINCT nach COUNT zu haben scheint, es geht definitiv nicht.

Ich habe mittlerweile die Lösung, hatte vergessen, das Thema zu schließen.

Die Lösung, falls sie nochmal jemand brauchen sollte:

Code:
SELECT Count([datum]) AS Anzahl,
Year([datum]) AS Jahr
FROM (SELECT DISTINCT [datum] FROM [tabelle])
GROUP BY Year([datum]);
 
Zurück