C
Guten Abend,
ich habe das Problem mit primary table gelöst es geht so:
sql>CREATE temporary table temp_tabel SELECT COUNT(documentname) AS mal, version, MAX(datum) AS datum FROM table GROUP BY documentname ORDER BY datum;
sql>SELECT temp_tabel.mal, table.documentname, table.datum FROM table, temp_tabel WHERE table.documentname=temp_tabel.documentname AND table.datum=temp_tabel.datum;
und schon bekommt man das richtige reihnfolge.
viele Grüße
C++_Hoby