Re: Order By number of rows returned ?

2001-12-15 Thread Steve Edberg
Hi - I had a nagging feeling that there was a better solution to this than the temporary table-based solutions I saw; I created a table 'test' with the data you have below, and played with queries a bit. I came up with this, seems to work: select a.web_account,a.code_short,sum(if(a.web_a

Re: Order By number of rows returned ?

2001-12-14 Thread Girish Nath
Hmmmrunning MySQL 3.22.32 on actual server :( No temporary heap tables :( Girish - Original Message - From: "Christopher Bergeron" <[EMAIL PROTECTED]> To: "MySQL" <[EMAIL PROTECTED]> Sent: Saturday, December 15, 2001 12:49 AM Subject: RE:

RE: Order By number of rows returned ?

2001-12-14 Thread Christopher Bergeron
1:25 AM To: Girish Nath Cc: Johnny Withers; [EMAIL PROTECTED] Subject: Re: Order By number of rows returned ? Create temporary files instead, in that case you don't have to worry about DROPing the tables, they will get dropped as soon as the mysql session is closed. Girish Nath wrote: GN

Re: Order By number of rows returned ?

2001-12-14 Thread sherzodR
To: Johnny Withers <[EMAIL PROTECTED]>, [EMAIL PROTECTED] GN: Subject: Re: Order By number of rows returned ? GN: GN: Hi GN: GN: Thanks for that, it works really well :) GN: GN: Best Regards GN: GN: GN: Girish GN: GN: GN: - Original Message -

Re: Order By number of rows returned ?

2001-12-14 Thread Girish Nath
Hi Thanks for that, it works really well :) Best Regards Girish - Original Message - From: "Johnny Withers" <[EMAIL PROTECTED]> To: "'Girish Nath'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, December 14, 2001 3:03

RE: Order By number of rows returned ?

2001-12-14 Thread Johnny Withers
I'm not sure if you can do this all in one query.. I tried a few JOINs, and nothing seemed to work. However, I'm not up to speed on how to join things together to get the best results. However, you can do it by creating a temp table: create table tmp01( web_account char(4) not null default '