Re: help with query to count rows while excluding certain rows

2016-01-02 Thread Larry Martell
On Fri, Jan 1, 2016 at 9:31 PM, Peter Brawley wrote: > On 1/1/2016 19:24, Larry Martell wrote: >> >> On Fri, Jan 1, 2016 at 2:12 PM, Peter Brawley >> wrote: >>> >>> On 12/31/2015 0:51, Larry Martell wrote: I need to count the

Re: help with query to count rows while excluding certain rows

2016-01-01 Thread Larry Martell
On Fri, Jan 1, 2016 at 2:12 PM, Peter Brawley wrote: > On 12/31/2015 0:51, Larry Martell wrote: >> >> I need to count the number of rows in a table that are grouped by a >> list of columns, but I also need to exclude rows that have more then >> some count when grouped

Re: help with query to count rows while excluding certain rows

2016-01-01 Thread Peter Brawley
On 12/31/2015 0:51, Larry Martell wrote: I need to count the number of rows in a table that are grouped by a list of columns, but I also need to exclude rows that have more then some count when grouped by a different set of columns. Conceptually, this is not hard, but I am having trouble doing

help with query to count rows while excluding certain rows

2015-12-30 Thread Larry Martell
I need to count the number of rows in a table that are grouped by a list of columns, but I also need to exclude rows that have more then some count when grouped by a different set of columns. Conceptually, this is not hard, but I am having trouble doing this efficiently. My first counting query

Querry Count Rows

2007-10-01 Thread Tomas Abad
Hi all, I have a table with ordes and i want to know the top 10 Citys have the most ordes. This is my table Order_id, City Need count the rows where haver the most similar text y the column City? Thanks all

Re: Querry Count Rows

2007-10-01 Thread Ananda Kumar
can u please give sample data. If the same city has more than one order_id then, you could use this select city,count(*) total from table group by city order by total desc limit 10; regards anandkl On 10/1/07, Tomas Abad [EMAIL PROTECTED] wrote: Hi all, I have a table with ordes and i

RE: Querry Count Rows

2007-10-01 Thread Tomas Abad
Very well, Works, thanks. -Mensaje original- De: Ananda Kumar [mailto:[EMAIL PROTECTED] Enviado el: lunes, 01 de octubre de 2007 13:16 Para: [EMAIL PROTECTED] CC: mysql@lists.mysql.com Asunto: Re: Querry Count Rows can u please give sample data. If the same city has more than one

Count Rows within unions

2004-10-15 Thread Martin Rytz
Hi SQL-Cracks How can I count the rows within a select with multiple unions? Count rows with one select is easy: select count(*) from table Count rows over multiple tables is complicated: select name from table1 union select name from table2 union select name from table3 order by name

Re: How to COUNT rows when they have a COUNT in them

2004-06-15 Thread Martijn Tonies
Just a note... Thanks - this did not work for me as I am on 4.0.17 - presumably this works on 4.1 (seems to need the SubQuery feature)? If so I will upgrade immediately! This isn't a subquery -- this is a Derived Table. With regards, Martijn Tonies Database Workbench - developer tool for

Re: How to COUNT rows when they have a COUNT in them

2004-06-15 Thread Garth Webb
immediately! From: Yayati Kasralikar [EMAIL PROTECTED] To: Dave Torr [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: How to COUNT rows when they have a COUNT in them Date: Mon, 14 Jun 2004 23:37:15 -0400 Following query does what you want: SELECT COUNT(*) from (SELECT COUNT(*) as c

Re: How to COUNT rows when they have a COUNT in them

2004-06-15 Thread Michael Stassen
PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: How to COUNT rows when they have a COUNT in them Date: Mon, 14 Jun 2004 23:37:15 -0400 Following query does what you want: SELECT COUNT(*) from (c) as temp -Yayati Dave Torr wrote: Probably simple but I can't figure it out! THe manual section 3.3.4.8

Re: How to COUNT rows when they have a COUNT in them

2004-06-15 Thread Dave Torr
Thanks - that is basically what I used to do (it works fine now on 4.1.2) but it was very slow as there are a LOT of rows and this method returned all of them. From: Garth Webb [EMAIL PROTECTED] To: Dave Torr [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: How to COUNT rows when they have

Re: How to COUNT rows when they have a COUNT in them

2004-06-15 Thread Brian Mansell
as there are a LOT of rows and this method returned all of them. From: Garth Webb [EMAIL PROTECTED] To: Dave Torr [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: How to COUNT rows when they have a COUNT in them Date: Tue, 15 Jun 2004 09:54:19 -0700 You could also try: SELECT owner

How to COUNT rows when they have a COUNT in them

2004-06-14 Thread Dave Torr
Probably simple but I can't figure it out! THe manual section 3.3.4.8 has the example SELECT owner, COUNT(*) FROM pet GROUP BY owner which is fine. Now what I want to do is count the number of rows this returns. Actually of course this is trivial - I can just count how many owners there are.

Re: How to COUNT rows when they have a COUNT in them

2004-06-14 Thread Yayati Kasralikar
Following query does what you want: SELECT COUNT(*) from (SELECT COUNT(*) as c FROM pet GROUP BY owner HAVING c1) as temp -Yayati Dave Torr wrote: Probably simple but I can't figure it out! THe manual section 3.3.4.8 has the example SELECT owner, COUNT(*) FROM pet GROUP BY owner which is fine.

Re: How to COUNT rows when they have a COUNT in them

2004-06-14 Thread Dave Torr
Thanks - this did not work for me as I am on 4.0.17 - presumably this works on 4.1 (seems to need the SubQuery feature)? If so I will upgrade immediately! From: Yayati Kasralikar [EMAIL PROTECTED] To: Dave Torr [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: How to COUNT rows when

Re: How to COUNT rows when they have a COUNT in them

2004-06-14 Thread Michael Stassen
: Re: How to COUNT rows when they have a COUNT in them Date: Mon, 14 Jun 2004 23:37:15 -0400 Following query does what you want: SELECT COUNT(*) from (SELECT COUNT(*) as c FROM pet GROUP BY owner HAVING c1) as temp -Yayati Dave Torr wrote: Probably simple but I can't figure it out! THe manual

Re: Count Rows?

2003-07-04 Thread Jeremy Zawodny
On Wed, Jul 02, 2003 at 10:57:18AM -0500, Roy W wrote: Is there a simple MySQL command that will give a Row Count (# of records) WITHOUT running a select (huge database) If it's a MyISAM table, just run a SELECT COUNT(*) FROM table_name. It's really efficient. Try it. :-) -- Jeremy D. Zawodny

Count Rows?

2003-07-02 Thread Roy W
Is there a simple MySQL command that will give a Row Count (# of records) WITHOUT running a select (huge database) Thanks! Roy

RE: Count Rows?

2003-07-02 Thread Mike Hillyer
: Wednesday, July 02, 2003 9:57 AM To: [EMAIL PROTECTED] Subject: Count Rows? Is there a simple MySQL command that will give a Row Count (# of records) WITHOUT running a select (huge database) Thanks! Roy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: count rows

2003-02-28 Thread Roman Sanchez
Here's a nice MySQL simple returning records query question! I want to return a staement saying 'number of records shave been found' for your selection. so presumably this is a simple row count based on the the returning recordset? Andrew Either with PHP or C you can use mysql_num_rows()

Re: count rows

2003-02-28 Thread William R. Mussatto
Here's a nice MySQL simple returning records query question! I want to return a staement saying 'number of records shave been found' for your selection. so presumably this is a simple row count based on the the returning recordset? Andrew Either with PHP or C you can use

Re: Count Rows in two tables

2002-11-13 Thread Shyamal Banerjee
Baranowski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 13, 2002 8:39 AM Subject: Re: Count Rows in two tables Please forgive me I am new to mySQL, could you give me an example of how I would do this? The two tables are users and staff Thanks Rick - Original Message

Re: Count Rows in two tables

2002-11-13 Thread Rick Baranowski
the error let me know and I will send it to you. Thanks again - Original Message - From: Shyamal Banerjee [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 13, 2002 4:29 AM Subject: Re: Count Rows in two tables If you know the primary keys of the two tables, it may be done

Count Rows in two tables

2002-11-12 Thread Rick Baranowski
Hello all, Does anybody have a SQL string to count the rows in two different tables and give you a total number of rows? I have been trying to find an answer for a couple of days and seems like a simple string. Thank you Rick

RE: Count Rows in two tables

2002-11-12 Thread Alan McDonald
You can't count the join? Alan -Original Message- From: Rick Baranowski [mailto:rickb;baranconsulting.com] Sent: Wednesday, 13 November 2002 12:10 To: [EMAIL PROTECTED] Subject: Count Rows in two tables Hello all, Does anybody have a SQL string to count the rows in two

Re: Count Rows in two tables

2002-11-12 Thread R. Hannes Niedner
On 11/12/02 5:36 PM, Alan McDonald [EMAIL PROTECTED] wrote: You can't count the join? Alan Hello all, Does anybody have a SQL string to count the rows in two different tables and give you a total number of rows? I have been trying to find an answer for a couple of days and seems like

Re: Count Rows in two tables

2002-11-12 Thread Ed Reed
Does it have to be in a single query. You could use a Union query and then total the results in your program. Select Count(Field1) From Table1 Union Select Count(Field1) From Table2; Rick Baranowski [EMAIL PROTECTED] 11/12/02 5:10:14 PM Hello all, Does anybody have a SQL string to count

Re: Count Rows in two tables

2002-11-12 Thread Murad Nayal
To: [EMAIL PROTECTED] Subject: Count Rows in two tables Hello all, Does anybody have a SQL string to count the rows in two different tables and give you a total number of rows? I have been trying to find an answer for a couple of days and seems like a simple string. Thank you

RE: Count Rows in two tables

2002-11-12 Thread Alan McDonald
Ah, yes - sorry Alan -Original Message- From: [EMAIL PROTECTED] [mailto:murad;godel.bioc.columbia.edu]On Behalf Of Murad Nayal Sent: Wednesday, 13 November 2002 12:58 Cc: [EMAIL PROTECTED] Subject: Re: Count Rows in two tables Alan McDonald wrote: You can't count

Re: Count Rows in two tables

2002-11-12 Thread Rick Baranowski
Please forgive me I am new to mySQL, could you give me an example of how I would do this? The two tables are users and staff Thanks Rick - Original Message - From: Murad Nayal [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, November 12, 2002 6:58 PM Subject: Re: Count Rows

how to count rows in JDBC ResultSet ?

2001-01-19 Thread Dainius Ramanauskas
Hello, I want to know the number of rows in a JDBC-ResulSet just by calling a function like it's done in PHP with mysql_num_rows($result) There seems to be no such function in the ResultSet interface as defined in Java 2. cheers Oliver Doepner