Klaus Mock: Tabellen-Design / Query vereinfachen

Beitrag lesen

Hallo,

select  content.user_id
  from  config.property as property,
        data.value as value,
        data.content as content
 where  content.value_id = value.id
   and  content.property_id = property.id
   and (    (property.name = 'userAgent' and  value.data = 'IE')
         or (property.name = 'remoteAddr' and  value.data = '127.0.0.1')
       )
 group by content.user_id
having count(*) = 2

sollte es (ungetestet) auch tun.

Grüße
  Klaus