Matze: Mehrere Bedingungen in einer Abfrage?

Beitrag lesen

Du musst die Abfrage entsprechend erweitern....

select name.tb1, name.tb2 from table tb1, table tb2 where tb1.grpid = max(tb1.grpid) and tb2.grpid = max(tb2.grpid) and tbi.id = min(tb1.id) and tb2.id = min(tb2,id)and

tb2.grpid = main_id and tb1.main_id = main_id

Verstanden ??? Du kannst das ganze mit beliebigen Bedingung erweitern und über aliase so tief verschachteln wie Du willst.
Muss nur schnell weg und kann erst in 40 Minuten wieder helfen.