Thanks Shawn!
Peter Brawley <[EMAIL PROTECTED]> wrote:Seena,
That data is for one date. To test Shawn's 2-stage query I'd need a data for
several days.
Without your tables and data, I tried Shawn's algorithm on a test database we
use a lot, nwib, which is a MySQL port of th
Shawan,
Here you go.
mysql> select * from spam_stats
-> where rank <=10 ;
+-+-+--+---+---+---+
| report_date | report_sender_domain_id | rank | processed | spam | suspected |
+-+-+--+---
Please try my solution before you tell me it's broken, OK? I know you want
to see the top 10 spammers for EACH day. That's what I wrote for you.
Please try my solution with your data and get back to me with the results
and explain to me what's wrong so I can fix it.
Thank you for your patience,
Shawn,
query
SELECT *
FROM spam_stats
WHERE rank <= 10;
will return all rows which I don't want.
I need datewise top 10 spam domain.
means condition would be serach those rows which are having top 10 spam (means
highest) on each day and show the output like which I send earlier.
thanks
[EMAI
Seena Blace <[EMAIL PROTECTED]> wrote on 05/16/2005 11:13:48 AM:
> shawn
> I think 2nd query will return only 10 rows.
> I want out like followings
> date domain spam
> 05/05/05 hotmail.com120
> 05/05/05 yahoo.com 110
>
shawn
I think 2nd query will return only 10 rows.
I want out like followings
date domain spam
05/05/05 hotmail.com120
05/05/05 yahoo.com 110
05/05/05 abc.com 99
05/05/05 def.com
Seena Blace <[EMAIL PROTECTED]> wrote on 05/16/2005 10:08:15 AM:
> Any suggestion pl?
>
> Seena Blace <[EMAIL PROTECTED]> wrote:hi,
> here is table description
> report1
>
> +-+--+--+-
> +-++
> | Field | Type | N
Any suggestion pl?
Seena Blace <[EMAIL PROTECTED]> wrote:hi,
here is table description
report1
+-+--+--+-+-++
| Field | Type | Null | Key | Default | Extra |
+-+--+--+--
hi,
here is table description
report1
+-+--+--+-+-++
| Field | Type | Null | Key | Default
| Extra |
+-+--+--+-+-
SELECT ... ORDER BY score LIMIT 10
PB
-
- Original Message -
From: "Kevin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 29, 2002 1:11 PM
Subject: Query - Top Ten
> Hello,
>
> I have a table with the following structure and
> Hello,
>
> I have a table with the following structure and values:
>
> CustomerIDScore
>
> 4 8
> 2 6
> 3 2
> 3 8
> 4 7
> 2 7
>
> I would like to query
Hello,
I have a table with the following structure and values:
CustomerIDScore
4 8
2 6
3 2
3 8
4 7
2 7
I would like to query for the top ten customer ave
12 matches
Mail list logo