Re: Group by with an IF

2006-08-14 Thread Brent Baisley
eb_id, season_week_date - Original Message - From: "Steffan A. Cline" <[EMAIL PROTECTED]> To: Sent: Sunday, August 13, 2006 5:33 AM Subject: Group by with an IF I have the following query: select *, if( season_week_date = "2006-08-16", "on"

Re: Group by with an IF

2006-08-13 Thread Chris
Steffan A. Cline wrote: I have the following query: select *, if( season_week_date = "2006-08-16", "on", "off" ) as stat, sum(overall_points) as total_points from rosters r left join celebs c on c.celeb_id = r.celeb_id where season_id=5062 and user_id=1 group by r.celeb_id order by overall

Group by with an IF

2006-08-13 Thread Steffan A. Cline
I have the following query: select *, if( season_week_date = "2006-08-16", "on", "off" ) as stat, sum(overall_points) as total_points from rosters r left join celebs c on c.celeb_id = r.celeb_id where season_id=5062 and user_id=1 group by r.celeb_id order by overall_rank, ln, fn; It almost wo