acob "Techek" Kamp Hansen
- webmonkey at Portaltjenesten A/S (dk)
-Oprindelig meddelelse-
Fra: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sendt: 1. april 2001 23:23
Til: MySQL List
Emne: most viewed
I've got a table that contains a list of bands. There's a field named
views. T
EMAIL PROTECTED]]On Behalf Of
--==[bMan]==--
Sent: Sunday, April 01, 2001 4:37 PM
To: Tyler Longren
Cc: MySQL List
Subject: Re: most viewed
You should definitely read up the manual. If you don't do this, will not do
you homework and simply expect an answer handed down to you, you
6
> 2 WISH10
> 3 Deftones 45
>
> What's the SQL to select the top 2 most viewed bands(which would be WISH &
> Deftones)? I've tried a few things, but haven't gotten anything to work
> correctly for me. Thanks.
>
> Tyler Longren
&
SH 10
> 3 Deftones 45
>
>
> What's the SQL to select the top 2 most viewed bands
SELECT artist
FROM my_table
ORDER BY views DESC
LIMIT 2
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/
--
I've got a table that contains a list of bands. There's a field named
views. This field contains how many times each band's page has been viewed.
Ex:
id artist views
1 No names6
2 WISH10
3 Deftones45
What's the SQL to s