Re: How to find top 25 selling products for each day of year?

2011-05-08 Thread Peter Brawley
>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

How to find top 25 selling products for each day of year?

2011-05-08 Thread mos
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

Re: SUM Top 10 records

2010-09-28 Thread Евгений Килимчук
; ++ > | 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 >> >>

Re: SUM Top 10 records

2010-09-28 Thread Евгений Килимчук
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

Re: SUM Top 10 records

2010-09-28 Thread Tompkins Neil
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(

SUM Top 10 records

2010-09-28 Thread Tompkins Neil
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

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-30 Thread Ken Menzel
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

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-30 Thread Rene Fournier
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

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-30 Thread Rene Fournier
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.

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-24 Thread Ken Menzel
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.

RE: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-24 Thread Martin Gainty
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_

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-24 Thread Rene Fournier
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

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-23 Thread Ken Menzel
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

Re: Ancient, unsolved high-CPU problem -- vmstat, top and ps

2008-09-23 Thread Rene Fournier
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

RE: force row to appear at top of results using order by

2008-07-01 Thread Jerry Schwartz
>-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

RE: force row to appear at top of results using order by

2008-07-01 Thread Rolando Edwards
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

Re: force row to appear at top of results using order by

2008-07-01 Thread Andrew Martin
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]&

force row to appear at top of results using order by

2008-07-01 Thread Andrew Martin
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

Re: How to find the top most member in a hierarchy of subcategories

2006-09-13 Thread Jo�o C�ndido de Souza Neto
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.

Re: How to find the top most member in a hierarchy of subcategories

2006-09-04 Thread Renato Golin
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

RE: How to find the top most member in a hierarchy of subcategories

2006-09-04 Thread Peter Lauri
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

RE: How to find the top most member in a hierarchy of subcategories

2006-09-04 Thread Peter Lauri
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

Re: How to find the top most member in a hierarchy of subcategories

2006-09-04 Thread Jo�o C�ndido de Souza Neto
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

How to find the top most member in a hierarchy of subcategories

2006-09-04 Thread abhishek jain
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,

Re: MS SQL TOP Replacement

2006-06-29 Thread Mike
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

RE: MS SQL TOP Replacement

2006-06-29 Thread George Law
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

Re: MS SQL TOP Replacement

2006-06-29 Thread Mike Wexler
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

MS SQL TOP Replacement

2006-06-29 Thread Mike
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 Attention: Top Language to interface with SQL servers - PostgreSQL, MySQL, FireBird

2006-06-04 Thread Al_Dev
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

Re: Top N selections + rest row

2006-04-25 Thread Joerg Bruehe
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

Re: Top N selections + rest row

2006-04-25 Thread C.R.Vegelin
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

Re: Top N selections + rest row

2006-04-25 Thread C.R.Vegelin
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

Re: Top N selections + rest row

2006-04-25 Thread Joerg Bruehe
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

Re: Top N selections + rest row

2006-04-25 Thread Martijn Tonies
> > 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

Re: Top N selections + rest row

2006-04-25 Thread Shawn Green
--- "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. >

Re: Top N selections + rest row

2006-04-25 Thread C.R.Vegelin
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

Re: Top N selections + rest row

2006-04-25 Thread Martijn Tonies
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

Re: Top N selections + rest row

2006-04-25 Thread Barry
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

Top N selections + rest row

2006-04-25 Thread C.R.Vegelin
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

RE: top one row

2005-08-05 Thread Gordon Bruce
,'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

Re: top one row

2005-08-05 Thread Scott Noyes
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

RE: top one row

2005-08-05 Thread Jay Blanchard
[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

Re: top one row

2005-08-05 Thread Scott Noyes
> 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

RE: top one row

2005-08-05 Thread Jay Blanchard
[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]

RE: top one row

2005-08-05 Thread Jay Blanchard
[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

Re: top one row

2005-08-05 Thread Scott Noyes
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

top one row

2005-08-05 Thread Kemin Zhou
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

Re: QUERY (TOP)

2005-05-18 Thread Seena Blace
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

Re: QUERY (TOP)

2005-05-17 Thread Seena Blace
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

Re: QUERY (TOP)

2005-05-16 Thread SGreen
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

Re: QUERY (TOP)

2005-05-16 Thread Seena Blace
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

Re: QUERY (TOP)

2005-05-16 Thread SGreen
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

Re: QUERY (TOP)

2005-05-16 Thread Seena Blace
..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

Re: QUERY (TOP)

2005-05-16 Thread SGreen
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_

Re: QUERY (TOP)

2005-05-16 Thread Seena Blace
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

QUERY (TOP)

2005-05-15 Thread Seena Blace
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;

Re: TOP N record

2005-05-13 Thread Mike Wexler
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

TOP N record

2005-05-13 Thread Seena Blace
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

Re: mysql top 2 rows for each group

2005-04-29 Thread SGreen
=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/

Re: mysql top 2 rows for each group

2005-04-29 Thread Vivian Wang
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 | +--

Re: mysql top 2 rows for each group

2005-04-29 Thread mfatene
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 | > >>+--

Re: mysql top 2 rows for each group

2005-04-29 Thread Vivian Wang
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

RE: mysql top 2 rows for each group

2005-04-28 Thread mathias fatene
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

RE: mysql top 2 rows for each group

2005-04-28 Thread SGreen
"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 | > |

RE: mysql top 2 rows for each group

2005-04-28 Thread mathias fatene
--- 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

RE: mysql top 2 rows for each group

2005-04-28 Thread Jay Blanchard
[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

mysql top 2 rows for each group

2005-04-28 Thread Vivian Wang
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

RE: Importing Tables on Top of Tables

2005-02-10 Thread Tom Crimmins
> -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

Importing Tables on Top of Tables

2005-02-10 Thread David Blomstrom
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

Re: Unable top drop table, error 1051

2004-09-29 Thread Markus Fischer
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]

Re: Unable top drop table, error 1051

2004-09-28 Thread Egor Egorov
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 / /|_/ / // /\ \/ /_

Re: Unable top drop table, error 1051

2004-09-24 Thread Markus Fischer
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

Re: Unable top drop table, error 1051

2004-09-24 Thread Markus Fischer
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

Re: Unable top drop table, error 1051

2004-09-24 Thread Egor Egorov
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

Unable top drop table, error 1051

2004-09-22 Thread Markus Fischer
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

RE: TOP

2004-07-29 Thread SGreen
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. > >

RE: TOP

2004-07-29 Thread Kamal Ahmed
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

AW: TOP

2004-07-28 Thread Freddie Sorensen
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

Re: TOP

2004-07-28 Thread Justin Swanhart
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

Re: TOP

2004-07-28 Thread SGreen
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

TOP

2004-07-28 Thread Kamal Ahmed
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]

Show Top 3 Matches in each Category

2004-07-08 Thread JVanV8
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

Re: From the top! (primary/foreign keys)

2004-05-12 Thread David Blomstrom
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

Re: From the top! (primary/foreign keys)

2004-05-12 Thread David Blomstrom
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

Re: From the top! (primary/foreign keys)

2004-05-12 Thread Ligaya Turmelle
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),

From the top! (primary/foreign keys)

2004-05-12 Thread David Blomstrom
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

Re: SELECT TOP

2003-07-14 Thread Eternal Designs, Inc
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

Re: SELECT TOP

2003-07-14 Thread Jake Johnson
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

Re: SELECT TOP

2003-07-14 Thread Eternal Designs, Inc
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

Re: SELECT TOP

2003-07-14 Thread William R. Mussatto
> 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 >

Re: SELECT TOP

2003-07-14 Thread Gabriel Guzman
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

Re: SELECT TOP

2003-07-14 Thread Jake Johnson
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

Re: SELECT TOP

2003-07-14 Thread woody at nfri dot com
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

Re: SELECT TOP

2003-07-14 Thread Phil Bitis
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 >

SELECT TOP

2003-07-14 Thread Jim McAtee
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

Top MYSQL Sites

2003-02-11 Thread Insanely Great
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

Re: Query - Top Ten

2002-10-29 Thread Peter Brawley
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

RE: Query - Top Ten

2002-10-29 Thread James Northcott
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 ---

Query - Top Ten

2002-10-29 Thread Kevin
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

Upgrade Q from 3.23 to 4 ie installing on top of 3.23

2002-08-30 Thread Chuck Amadi
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   2   >