-- remotehost rfc931 authuser [date] "request" status bytes
select IPn.IPText 
|| ' ' || H.AuthName
|| ' ' || H.AuthUser
|| ' ' || '[' || H.HitDateTime || ']'
|| ' ' || '"' || U.URLText || '"'
|| ' ' || H.status
|| ' ' || H.Size
from IPnames IPn, Hit H, Url U
where H.ipid=IPn.ipid
  and H.URLID=U.URLID
  and H.CustomerID= (select customerid from customer
     where Customertext='pi.dk')
  and hitdatetime < 'now'::timestamp
  and hitdatetime > 'now'::timestamp-'1 year'::interval
  and H.URLID=U.URLID
;
