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
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:
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
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 -
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
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 '