Re: Self-Join Query

2004-06-04 Thread Brent Baisley
Perhaps I got my syntax wrong. IF() has been available since 3.23 as far as I know. I find it more readable than case if I'm only doing a single test, but either accomplishes what you need. Here is the documentation for CASE and IF http://dev.mysql.com/doc/mysql/en/Control_flow_functions.html On

RE: Self-Join Query

2004-06-03 Thread James KATARSKI
University ML -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Harald Fuchs Sent: Thursday, June 03, 2004 10:23 PM To: [EMAIL PROTECTED] Subject: Re: Self-Join Query In article <[EMAIL PROTECTED]>, "James KATARSKI" <[EMAIL PROTECTED]> writes: > I&

Re: Self-Join Query

2004-06-03 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, "James KATARSKI" <[EMAIL PROTECTED]> writes: > I'm trying to generate a report like this: (Which I've done in TWO > querys, the copied and pasted together) > +-+--+--+ > | Page Name | Internal | External | > +-+--+-

Re: Self-Join Query

2004-06-03 Thread Brent Baisley
You may want to forget all those joins and filters to create two columns, which is probably making MySQL do multiple full table scans. It sounds like what you are really looking for is to separate your hits into 2 columns based on the ip address, and perhaps put a filter on the hit time or page