Stuck with a query...

From: Geoff Caplan <geoff(at)variosoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Stuck with a query...
Date: 2005-03-08 17:47:12
Message-ID: 17538254036.20050308174712@variosoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi folks,

Sorry to ask a newbie SQL question but I'm struggling...

I have a website clickstream log:

request_id session_id sequence_num url
100 xxx 1 /foo
101 xxx 2 /bar
102 xxx 3 /hoo
103 yyy 1 /foo
104 yyy 2 /bar

I need to count the number of times each url was an exit
page. An exit page is the highest sequence_num for each
session_id - 102 & 104 in the example. The report would look
like:

Exit pages:

/foo 4555
/bar 3204
/hoo 2337

etc...

Any pointers would be much appreciated!

------------------
Geoff Caplan
Vario Software Ltd
(+44) 121-515 1154

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-03-08 18:04:34 Re: Stuck with a query...
Previous Message Michael Fuhr 2005-03-08 17:28:39 Re: Move cursor