>I would like to create a table with the top 25 Amt_Sold products for
each day
Examples at "Top N per group" at http://www.artfulsoftware.com/queries.php
PB
-
On 5/8/2011 12:21 PM, mos wrote:
I have a table (MyISAM) with summarized Sales data:
Table: ProdSales
Column
I have a table (MyISAM) with summarized Sales data:
Table: ProdSales
Columns:
Sales_Date Date,
Product_Code Char(10),
Amt_Sold Double
There are approx 5,000 products sold each day and there are 3 years worth
of data. I would like to create a table with the top 25 Amt_Sold products
for
; ++
> | 4.5000 |
> | 1.2500 |
> | 7.2000 |
> | 6.1500 |
> | 0.1000 |
> ++
>
> 2010/9/28 Tompkins Neil
>
>> Hi
>>
>>
>> I've a basic table like and want to SUM the top 5 values. For example if
>> I
>> have
>>
>>
select `rating`/100+`id` as result from `your_table_name` order by `rating`
desc LIMIT 5;
++
| result |
++
| 4.5000 |
| 1.2500 |
| 7.2000 |
| 6.1500 |
| 0.1000 |
++
2010/9/28 Tompkins Neil
> Hi
>
> I've a basic table like and want to SUM the top 5 values
Christoph, this SUMs all values ?
On Tue, Sep 28, 2010 at 11:25 AM, Christoph Boget wrote:
> > I've a basic table like and want to SUM the top 5 values. For example if
> I
> > have
> >
> > Any suggestions on how to achieve this ?
> >
>
> SELECT SUM(
Hi
I've a basic table like and want to SUM the top 5 values. For example if I
have
id, rating
0, 10
1, 25
2, 5
3, 10
4, 50
5, 1
6, 15
7, 20
8, 9
I want my query to sum the values
4,50
1,25
7,20
6.15
0,10
Suming a value of 120
Any suggestions on how to achieve this ?
Cheers
Neil
from http://dev.mysql.com/doc/refman/5.1/en/connecting.html
On Unix, MySQL programs treat the hostname |localhost| specially, in a
way that is likely different from what you expect compared to other
network-based programs. For connections to |localhost|, MySQL programs
attempt to connect to th
Presently, I'm only using localhost for MySQL database user
privileges, e.g., :
[EMAIL PROTECTED] -- for all privileges on all databases
Do I need to change the above if I add skip-name-resolve to my.cnf?
(Since localhost is, I thought, not really part of DNS but just an
alias for
So with skip-name-resolve in my.cnf (and MySQL restarted), it should
be okay to have [EMAIL PROTECTED] in the GRANT table since localhost
resolves without DNS lookup? Or do I need to specify [EMAIL PROTECTED]
Sorry, just need to clarify this bit before changing a few things.
Thanks again.
mory Statistics: (page size of 4096 bytes)
Pages free: 534327.
Pages active: 331233.
Pages inactive: 1094528.
Pages wired down: 137065.
"Translation faults": 957568490.
Pages copy-on-write: 241306984.
Pages zero filled:1302796176.
em -- vmstat, top and ps
> Date: Wed, 24 Sep 2008 14:21:44 +0200
>
> Thanks. I've read those links, and they sound like my problem.
>
> On each connection, MySQL calls gethostbyname() to resolve the
> hostname in the connection string into 127.0.0.1 -- e.g.,
> mysql_
ted:790261.
Pageins: 95668.
Pageouts: 1212.
Object cache: 217985425 hits of 220226841 lookups (98% hit rate)
Top says:
Processes: 115 total, 3 running, 112 sleeping... 504
threads 08:12:30
Load Avg: 2.43, 2.44, 2.30 CPU usage
filled:1302796176.
Pages reactivated:790261.
Pageins: 95668.
Pageouts: 1212.
Object cache: 217985425 hits of 220226841 lookups (98% hit rate)
Top says:
Processes: 115 total, 3 running, 112 sleeping... 504 threads
08:12:30
Lo
1212.
Object cache: 217985425 hits of 220226841 lookups (98% hit rate)
Top says:
Processes: 115 total, 3 running, 112 sleeping... 504 threads
08:12:30
Load Avg: 2.43, 2.44, 2.30 CPU usage: 45.3% user, 48.2% sys,
6.5% idle
Networks: 676 ipkts/72K 738 op
>-Original Message-
>From: Andrew Martin [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, July 01, 2008 9:20 AM
>To: mysql@lists.mysql.com
>Subject: force row to appear at top of results using order by
>
>Hello,
>
>I have an order by question...
>
>This is t
SELECT events_groups_id, events_groups_name FROM events_groups
ORDER BY IF(events_groups_id=1,0,1),events_groups_name ASC;
-Original Message-
From: Andrew Martin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 01, 2008 9:20 AM
To: mysql@lists.mysql.com
Subject: force row to appear at top of
Many thanks for the quick replies! This solution appears the most elegant:
-- Forwarded message --
From: Markus Grossrieder <[EMAIL PROTECTED]>
Date: 2008/7/1
Subject: Re: force row to appear at top of results using order by
To: Andrew Martin <[EMAIL PROTECTED]&
Hello,
I have an order by question...
This is the "raw" data...
mysql> SELECT events_groups_id, events_groups_name FROM events_groups;
+--+-+
| events_groups_id | events_groups_name |
+--+-+
|1 | Personal Ev
ble structure like :
> ID , NAME, PARENT_ID
> 1 , Top , 0
> 2 , Level 1 , 1
> 3 , Level 2 ,2
> 4 , Another Top , 0
>
>
> and so on.
> I wanted to know the topmost cat. if i have the lowest category id ie. 3
> in
> this case.
> I wanted to get like 3->2->1
> Pl.
Peter Lauri wrote:
Yes, and this shows that you can not do it will MySQL purely :) But a
scripting language like php can do it for you with a recursive function as
the best option.
IMHO, the best option would do it with a procedure as you don't get out
of the database and don't have any overhe
PM
To: mysql@lists.mysql.com
Subject: Re: How to find the top most member in a hierarchy of subcategories
I´m not quite sure if it could help you, because it´s whole in portuguese,
but i´ll send you.
My table is called categoria and has the follow structure:
CREATE TABLE `categoria` (
`id
Sent: Monday, September 04, 2006 4:29 PM
To: mysql@lists.mysql.com
Subject: How to find the top most member in a hierarchy of subcategories
Hi,
I have a table structure like :
ID , NAME, PARENT_ID
1 , Top , 0
2 , Level 1 , 1
3 , Level 2 ,2
4 , Another Top , 0
and so on.
I wanted to know the
ar(50) NOT NULL default '',
`icone` varchar(255) NOT NULL default '',
`cod_shop` varchar(5) NOT NULL default '',
`topo` char(1) NOT NULL default '',
PRIMARY KEY (`id`)
)
Where the relations each register of the tree are like this:
ID , CATEG
Hi,
I have a table structure like :
ID , NAME, PARENT_ID
1 , Top , 0
2 , Level 1 , 1
3 , Level 2 ,2
4 , Another Top , 0
and so on.
I wanted to know the topmost cat. if i have the lowest category id ie. 3 in
this case.
I wanted to get like 3->2->1
Pl. help me , cn i do this in one query,
I guess I had the LIMIT in the wrong location.
Thanks for the help!
Mike
"Mike Wexler" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Mike wrote:
>> I have a SELECT statement for MS SQL that is
>>
>> SELECT TOP 1 id FROM menu_links ORDER BY
SELECT max(id) FROM menu_links
:)
> -Original Message-
> From: Mike Wexler [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 29, 2006 1:22 PM
> To: Mike
> Cc: mysql@lists.mysql.com
> Subject: Re: MS SQL TOP Replacement
>
> Mike wrote:
> > I have a SELEC
Mike wrote:
I have a SELECT statement for MS SQL that is
SELECT TOP 1 id FROM menu_links ORDER BY id desc
and need to convert it to MySQL. I cannot find what will do that.
Help is greatly appreciated.
TIA
Mike
SELECT id FROM menu_links ORDER BY id desc LIMIT 1
--
MySQL
I have a SELECT statement for MS SQL that is
SELECT TOP 1 id FROM menu_links ORDER BY id desc
and need to convert it to MySQL. I cannot find what will do that.
Help is greatly appreciated.
TIA
Mike
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To
World-Wide public announcement (every human animal on this planet
must read this announcement) :
The top RDBMS SQL systems are:
Number one: PostgreSQL
Number two: FireBird and MySQL.
Now, which are the top computer languages which you would use to
interface with these SQL servers??
You
11995 14332
Japan Sales14234 13364
Rest Sales17663 12563
--
if a user requires a Top-5 selection for 2005,
and where Totals of both 2004 and 2005 are 100%.
My impression is your requirements are slowly changing
Sales14234 13364
Rest Sales17663 12563
--
if a user requires a Top-5 selection for 2005,
and where Totals of both 2004 and 2005 are 100%.
Regards, Cor
- Original Message -
From: "Joerg Bruehe" <[EMAIL PROTECTED
in" <[EMAIL PROTECTED]>; "Martijn Tonies"
<[EMAIL PROTECTED]>; ; <[EMAIL PROTECTED]>
Sent: Tuesday, April 25, 2006 1:18 PM
Subject: Re: Top N selections + rest row
--- "C.R.Vegelin" <[EMAIL PROTECTED]> wrote:
Thanks Martijn, Barry,
I was wonder
Hi Shawn, Cor, all!
Shawn Green wrote:
--- "C.R.Vegelin" <[EMAIL PROTECTED]> wrote:
Thanks Martijn, Barry,
I was wondering whether it could be done in a single query.
I want users to decide how many countries they want,
and show world sales on top of report followed by the N
> > Thanks Martijn, Barry,
> > I was wondering whether it could be done in a single query.
> > I want users to decide how many countries they want,
> > and show world sales on top of report followed by the N countries.
> > This to enable relative country shares, bot
--- "C.R.Vegelin" <[EMAIL PROTECTED]> wrote:
> Thanks Martijn, Barry,
> I was wondering whether it could be done in a single query.
> I want users to decide how many countries they want,
> and show world sales on top of report followed by the N countries.
>
Thanks Martijn, Barry,
I was wondering whether it could be done in a single query.
I want users to decide how many countries they want,
and show world sales on top of report followed by the N countries.
This to enable relative country shares, both for reporting and graphs.
For example, Top-10
Hi,
>Anybody with smart ideas to get Top-N rows plus the rest row ?
>Suppose I have ranked sales values descending for 2005, like:
>Select Country, Sum(Sales) AS Sales From myTable
>Where Year=2005 Group By Country
>Order By Sales DESC LIMIT 25;
>
>Then I get Top-25 sales ro
C.R.Vegelin wrote:
Hi All,
Anybody with smart ideas to get Top-N rows plus the rest row ?
Suppose I have ranked sales values descending for 2005, like:
Select Country, Sum(Sales) AS Sales From myTable
Where Year=2005 Group By Country
Order By Sales DESC LIMIT 25;
Then I get Top-25 sales rows
Hi All,
Anybody with smart ideas to get Top-N rows plus the rest row ?
Suppose I have ranked sales values descending for 2005, like:
Select Country, Sum(Sales) AS Sales From myTable
Where Year=2005 Group By Country
Order By Sales DESC LIMIT 25;
Then I get Top-25 sales rows, but I also want a
,'0'),col3)),11,50) + 0 As col3
FROM sample
GROUP BY col1
-Original Message-
From: Kemin Zhou [mailto:[EMAIL PROTECTED]
Sent: Friday, August 05, 2005 12:38 PM
To: mysql@lists.mysql.com
Subject: top one row
I have a simple table
col1 col2col3
A 2 3
A 100
mysql> SELECT VERSION();
+---+
| VERSION() |
+---+
| 4.1.7-nt |
+---+
1 row in set (0.00 sec)
mysql> CREATE TABLE test (col1 INT, col2 INT, col3 INT);
Query OK, 0 rows affected (0.08 sec)
mysql> INSERT INTO test VALUES (1, 1, 1), (1, 2, 3);
Query OK, 2 rows affected (0.02
[snip]
> SELECT col1, MAX(col2), col3 FROM table GROUP BY col1;
Because col3 is not part of the GROUP BY clause, this query will not
guarantee that the col3 returned is associated with the col2 returned.
In other words, running this query on the table containing
col1 / col2 / col3
1 1
> SELECT col1, MAX(col2), col3 FROM table GROUP BY col1;
Because col3 is not part of the GROUP BY clause, this query will not
guarantee that the col3 returned is associated with the col2 returned.
In other words, running this query on the table containing
col1 / col2 / col3
1 11
1
[snip]
The same way you do it inother SQL's.
SELECT MAX(col2) FROM table GROUP BY col1;
[/snip]
Oops;
SELECT col1, MAX(col2), col3 FROM table GROUP BY col1;
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
[snip]
I have a simple table
col1 col2col3
A 2 3
A 100 70
A 100080
B20 90
B7080
To select the top one row for each unique value of col1
select distinct on (col1), col1, col2, col3
from table
order by col1, col2 desc, col3 desc
col2col3
> A 2 3
> A 100 70
> A 100080
> B20 90
> B 7080
>
>
> To select the top one row for each unique value of col1
>
> select distinct on (col1), col1, col2, col3
> from table
> order by col
I have a simple table
col1 col2col3
A 2 3
A 100 70
A 100080
B20 90
B7080
To select the top one row for each unique value of col1
select distinct on (col1), col1, col2, col3
from table
order by col1, col2 desc, col3 desc
ch is a MySQL port of the widely used (and copied)
Microsoft Northwind database. It has customers, orders, orderdetails, payments
etc, and it's populated. Your question,
who are the top ten spammers per day?
is logically equivalent, in nwib, to:
what customers made the top ten number of
18 |
+-+-+--+---+---+---+
10 rows in set (0.00 sec)
Thanks
[EMAIL PROTECTED] wrote:
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 wi
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 fo
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
5 yahoo.com 300
> 05/06/05 def.com 250
> 05/06/05 zer.com 200
> ..like that upto 10
>
> Each day there are multiple entry from diffrent domains or same domain.
> I
..like that upto 10
Each day there are multiple entry from diffrent domains or same domain.
I want each day whatever top 10 spam sender domain.
thanks
[EMAIL PROTECTED] wrote:
Seena Blace wrote on 05/16/2005 10:08:15 AM:
> Any suggestion pl?
>
> Seena Blace
0 | |
> | virus | int(10) unsigned | | | 0 | |
>
>
> I WANT REPORT LIKE FOLLOWINGS
>
> date sender processed spam suspected
>
>
> I want top 10 spam sender each day.
>
> QUery i'm using
> select date_format(time,'%Y-%d-%m'),report_
int(10) unsigned | | | 0 | |
| blocked | int(10) unsigned | | | 0 | |
| spam | int(10) unsigned | | | 0 | |
| virus | int(10) unsigned | | | 0 | |
I WANT REPORT LIKE FOLLOWINGS
date sender processed spam suspected
I want top 10 spam sender each day.
QUery i'm using
select date_format(tim
processedspam suspected
I want top 10 spam sender each day.
QUery i'm using
select date_format(time,'%Y-%d-%m'),report_sender_domain_id,processed ,spam
from report1
order by spam desc ,report_sender_domain_id,date_format(time,'%Y-%d-%m') limit
10;
SELECT date1, process, wip, worm FROM table WHERE field=value ORDER BY
otherField DESC LIMIT N
Seena Blace wrote:
Hi,
how to get top N records from table ?
columns of table
id
date1
process
wip
worm
I need output
date1 process wip worm
5/5/05
Hi,
how to get top N records from table ?
columns of table
id
date1
process
wip
worm
I need output
date1 process wip worm
5/5/05
5/6/05
5/7/05
thanks
-
Do you Yahoo!?
Yahoo! Mail - Find
=if([EMAIL PROTECTED],@temp1:[EMAIL PROTECTED],
> > @temp2:=
seqno);
> > but this logic is not correct, does anyone know how to solve this
one?
> >
> > [EMAIL PROTECTED] wrote:
> >
> > >"Jay Blanchard" <[EMAIL PROTECTED]> wrote on
04/28/
4/28/2005 04:24:23 PM:
[snip]
I have question about how I can get top 2 rows for each group.
like I have table test
| seqno |
+---+
| 00122 | | 00123 |
| 00123 | | 00123 | | 00336 |
| 00346 |
| 00349 |
| 00427 |
| 00427 |
| 00427 |
+--
Blanchard" <[EMAIL PROTECTED]> wrote on 04/28/2005
> >04:24:23 PM:
> >
> >
> >
> >>[snip]
> >>I have question about how I can get top 2 rows for each group.
> >>like I have table test
> >>| seqno |
> >>+--
know how to solve this one?
[EMAIL PROTECTED] wrote:
"Jay Blanchard" <[EMAIL PROTECTED]> wrote on 04/28/2005
04:24:23 PM:
[snip]
I have question about how I can get top 2 rows for each group.
like I have table test
| seqno |
+---+
| 00122 |
| 00123 |
| 000
7;Vivian Wang'; mysql@lists.mysql.com
Subject: RE: mysql top 2 rows for each group
Hi ,
The table must be myisam. Innodb refused my solution which is here :
Beatifull
auto_increment
mysql> create table seqs(seqno varchar(10) NOT NULL , i
"Jay Blanchard" <[EMAIL PROTECTED]> wrote on 04/28/2005
04:24:23 PM:
> [snip]
> I have question about how I can get top 2 rows for each group.
> like I have table test
> | seqno |
> +---+
> | 00122 |
> | 00123 |
> | 00123 |
> |
--- I like this type
of auto_increment
Best Regards
Mathias FATENE
Hope that helps
*This not an official mysql support answer
-Original Message-----
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: jeudi 28 avril 2005 22:24
To: Vivian Wang; mysql@lists.mysql.c
[snip]
I have question about how I can get top 2 rows for each group.
like I have table test
| seqno |
+---+
| 00122 |
| 00123 |
| 00123 |
| 00123 |
| 00336 |
| 00346 |
| 00349 |
| 00427 |
| 00427 |
| 00427 |
+---+--+
I like have
I have question about how I can get top 2 rows for each group.
like I have table test
| seqno |
+---+
| 00122 |
| 00123 |
| 00123 |
| 00123 |
| 00336 |
| 00346 |
| 00349 |
| 00427 |
| 00427 |
| 00427 |
+---+--+
I like have
> -Original Message-
> From: David Blomstrom
> Sent: Thursday, February 10, 2005 10:06
> To: mysql@lists.mysql.com
> Subject: Importing Tables on Top of Tables
>
> If I revise a MySQL table and try to publish it
> online, I often get the error message, "Ta
If I revise a MySQL table and try to publish it
online, I often get the error message, "Table my_table
already exists." So I have to delete the online
version before I can import the revised version.
Is there a way to just publish one table over another,
as long as both have the same name?
Thanks
Egor Egorov wrote:
Bug filled: http://bugs.mysql.com/bug.php?id=5784
Thank you!
Nice, thanks to you too ;-)
regards,
- Markus
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Bug filled: http://bugs.mysql.com/bug.php?id=5784
Thank you!
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ __
/ |/ /_ __/ __/ __ \/ /Egor Egorov
/ /|_/ / // /\ \/ /_
Hi,
Egor Egorov wrote:
Can you create a test case? I.e. a .sql file which is supposed to drop the
table well but instead fails?
Nevermind my last post, I found the workaround to disable foregin_key_checks
during import; interesting.
Here is a small example:
set foreign_key_checks=0;
CREATE TABLE
Hi,
Egor Egorov wrote:
Can you create a test case? I.e. a .sql file which is supposed to drop the
table well but instead fails?
This will help us determine if it's a bug and fix if it is.
Thanks, this hit a pretty interesting nail for me: I can dump it, but I can't load
the dump into the datab
Can you create a test case? I.e. a .sql file which is supposed to drop the
table well but instead fails?
This will help us determine if it's a bug and fix if it is.
Thank you!
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.n
Hi,
I've a problem that I can't drop a certain table, always get back the error "unknown
table".
Version: 4.0.21 (Debian Testing)
Table-Type: InnoDB
mysql> show tables;
[...]
| produkt_kategorie|
mysql> drop table produkt_kategorie;
ERROR 1051: Unknown table 'produkt_kategorie'
The ownersh
help, I was wondering, if you can make any sense out
> of WHERE should I insert the TOP Commands, in the snippet below.
> Although this code is specific to our application, but maybe you can
> help me with this.
>
> Thanks, and I really appreciate your help.
>
> -Kamal.
>
>
Shawn,
Thanks for your help, I was wondering, if you can make any sense out of
WHERE should I insert the TOP Commands, in the snippet below. Although
this code is specific to our application, but maybe you can help me with
this.
Thanks, and I really appreciate your help.
-Kamal
Check out the LIMIT function in the documentation
> -Ursprüngliche Nachricht-
> Von: Kamal Ahmed [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 28. Juli 2004 20:39
> An: [EMAIL PROTECTED]
> Betreff: TOP
>
> Hi,
> Does anyone know how to do a TOP functio
TOP is a microsoft SQL extension.
MySQL uses the LIMIT clause.
for instance, the following is a rather typical "top 10" sql query:
select some_column, sum(another_column) total
from some_table
group by some_column
order by total desc
LIMIT 10
On Wed, 28 Jul 2004 14:39:11 -0400, K
In MS SQL Server (T-SQL) you say
SELECT TOP n
In MySQL you use:
SELECT LIMIT n
(http://dev.mysql.com/doc/mysql/en/SELECT.html)
There is no direct equivalent to SELECT TOP n PERCENT
Yours,
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
"Kamal
Hi,
Does anyone know how to do a TOP function in MySQL ?
Thanks,
-Kamal.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hi all,
I am working on a search result query in which the user types a keyword and
the top 3 results for each category are displayed with 24 or so total results
on the page. The database is large (8 GB) and the table in which the fulltext
search occurs has 3 million rows.
Tables:
product
One more thing, though...
I don't understand this restrict and cascade function.
I looked for it when I created my table, but didn't
see any mention of it. If I understand MySQL's
documentation, I don't need to worry about it, because
it's created by default every time you create a
foreign key. Is
BINGO! About the same time I got your message, I
figured out how to create foreign keys with SQLyog. I
followed your instructions in creating two brand new
tables in phpMyAdmin, then linked the foreign key and
primary key in SQLyog.
I haven't tested it yet - there isn't even any data in
the tables
CREATE TABLE Continent (
CCODE VARCHAR(6) NOT NULL UNIQUE,
CGROUP VARCHAR(255),
TYPE VARCHAR(255),
NAME VARCHAR(255),
NUM_ID INT(4) NOT NULL UNIQUE,
PRIMARY KEY (CCODE),
TYPE = InnoDB);
CREATE TABLE Nations (
NAME VARCHAR(255) NOT NULL UNIQUE,
TYPE VARCHAR(255),
NCODE VARCHAR(6),
OK, I've made some changes, and I'm still trying to
figure out this foreign key stuff. This time, I'll
focus on just two tables, named "continents" and
"nations."
I put screen shots of their structure and some sample
rows online at http://www.geoworld.org/try.gif
It sounds like non-repeating nume
s.
On Mon, 14 Jul 2003, Gabriel Guzman wrote:
On Mon, 2003-07-14 at 17:44, Jake Johnson wrote:
Be careful! Phil wanted the top 20 and the limit 20 will only return a
random 20 records.
Actually, LIMIT x will return the first x rows of a query, not random
records. In fact, you can
2003, Gabriel Guzman wrote:
> On Mon, 2003-07-14 at 17:44, Jake Johnson wrote:
> > Be careful! Phil wanted the top 20 and the limit 20 will only return a
> > random 20 records.
>
> Actually, LIMIT x will return the first x rows of a query, not random
> records. In fact, you
Sure Woody and Phil are right; just take out TOP 20 and put LIMIT 20 at
the end of your SQL. If you care for the docs, the page is at
http://www.mysql.com/doc/en/SELECT.html
Peter
Eternal Designs
Phil Bitis wrote:
Yeah, put LIMIT 20 on the end.
- Original Message -
From: "Jim M
> What's wrong with the following query? The application used to use
> Access via ODBC, now running MySQL 3.23.xx, MyISAM table, accessed via
> MyODBC 3.51.01.
>
> // Return last 20 searches
> SELECT TOP 20 h.historyid, h.searchstring, h.serverid, s.shortname FROM
>
On Mon, 2003-07-14 at 17:44, Jake Johnson wrote:
> Be careful! Phil wanted the top 20 and the limit 20 will only return a
> random 20 records.
Actually, LIMIT x will return the first x rows of a query, not random
records. In fact, you can even combine ORDER BY and LIMIT if you want
to g
Be careful! Phil wanted the top 20 and the limit 20 will only return a
random 20 records.
Regards,
Jake Johnson
[EMAIL PROTECTED]
__
Plutoid - http://www.plutoid.com - Shop Plutoid for the best prices on
Rims, Car Audio, and
wrote:
> What's wrong with the following query? The application used to use Access via
> ODBC, now running MySQL 3.23.xx, MyISAM table, accessed via MyODBC 3.51.01.
>
> // Return last 20 searches
> SELECT TOP 20 h.historyid, h.searchstring, h.serverid, s.shortname
> FROM h
Yeah, put LIMIT 20 on the end.
- Original Message -
From: "Jim McAtee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 14, 2003 11:12 PM
Subject: SELECT TOP
> What's wrong with the following query? The application used to use Access
via
>
What's wrong with the following query? The application used to use Access via
ODBC, now running MySQL 3.23.xx, MyISAM table, accessed via MyODBC 3.51.01.
// Return last 20 searches
SELECT TOP 20 h.historyid, h.searchstring, h.serverid, s.shortname
FROM history h
INNER JOIN servers
Hello
Can somebody tell me what are the top sites ( except ofcourse mysql.com )
for general MySQL News, Tutorials etc.
Insane
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http
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
7
>
> I would like to query for the top ten customer averages. Is
> this possible in
> a single query?
Try:
select CustomerID, avg(score) as A from table_name group by CustomerID order by A desc
limit 10
---
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
3,23 to Version 4 not so helfully in relation to installing on
my homesation on Win98 ( Excuse my Language) I would like to insatll on
top of my existing in C:\mysql so is there a quick guide install set up
within the MySql Documentation somewhere as i have read the above
whereby i believe o
1 - 100 of 148 matches
Mail list logo