Einzelnen Beitrag anzeigen

nahpets
(Gast)

n/a Beiträge
 
#7

AW: HAVING mit MAX (alias)

  Alt 6. Jul 2012, 21:52
Hallo,

mir ist es nur auf diese Art gelungen (allerdings kein MySQL):
Code:
select id, anz from (
  select id, count(wert) as anz
  from tabelle
  group by id
) a
where anz = (
  select max(anz) from (
    select id, count(wert) as anz
    from tabelle
    group by id
  )
)
Mit Having scheint es nicht unbedingt zu gehe(?)
  Mit Zitat antworten Zitat