Mysql warning event :Changed limits

Mysql warning event :Changed limits

am 20.07.2009 13:08:28 von vinson.wei

--00163645813659ebb5046f212870
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Changed limits: max_open_files: 2048 max_connections: 1024 table_cache:
507

I'm getting the below warning in my event viewer:
Changed limits: max_open_files: 2048 max_connections: 1024 table_cache:
507

How can i slove it.

Thanks in advance.

--00163645813659ebb5046f212870--

Group by column and Sum another

am 20.07.2009 17:50:51 von Hagen Finley

I am hoping I can get some help with a query I am trying to construct:

I want to group by a 'contract' column and get the sum of the 'amlp' column
values associated with each contract. I can do a select and group by on
contract

select contract from maintenance group by contract;

and I will get each unique contract. However, I want to sum the amlp values
per unique contract and I am not sure how to construct that select
statement.

I tried:

select contract , sum(amlp) from maintenance where contract=(select contract
from maintenance group by contract);

But that resulted in a "ERROR 1242 (21000): Subquery returns more than 1
row" error.

Any suggestions?

Hagen Finley

Boulder



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Group by column and Sum another

am 20.07.2009 18:02:03 von Olexandr Melnyk

--001636c5b356441ebd046f2542d4
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

select contract , sum(amlp)
from maintenance
group by contract;

On Mon, Jul 20, 2009 at 6:50 PM, Hagen wrote:

> I am hoping I can get some help with a query I am trying to construct:
>
> I want to group by a 'contract' column and get the sum of the 'amlp' column
> values associated with each contract. I can do a select and group by on
> contract
>
> select contract from maintenance group by contract;
>
> and I will get each unique contract. However, I want to sum the amlp values
> per unique contract and I am not sure how to construct that select
> statement.
>
> I tried:
>
> select contract , sum(amlp) from maintenance where contract=(select
> contract
> from maintenance group by contract);
>
> But that resulted in a "ERROR 1242 (21000): Subquery returns more than 1
> row" error.
>
> Any suggestions?
>
> Hagen Finley
>
> Boulder
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=omelnyk@gmail.com
>
>


--
Sincerely yours,
Olexandr Melnyk
http://omelnyk.net/

--001636c5b356441ebd046f2542d4--

RE: Group by column and Sum another

am 20.07.2009 18:41:14 von Hagen Finley

Thanks! That did the trick.

-----Original Message-----
From: Olexandr Melnyk [mailto:omelnyk@gmail.com]
Sent: Monday, July 20, 2009 10:02 AM
To: mysql@lists.mysql.com
Subject: Re: Group by column and Sum another

select contract , sum(amlp)
from maintenance
group by contract;

On Mon, Jul 20, 2009 at 6:50 PM, Hagen wrote:

> I am hoping I can get some help with a query I am trying to construct:
>
> I want to group by a 'contract' column and get the sum of the 'amlp' column
> values associated with each contract. I can do a select and group by on
> contract
>
> select contract from maintenance group by contract;
>
> and I will get each unique contract. However, I want to sum the amlp values
> per unique contract and I am not sure how to construct that select
> statement.
>
> I tried:
>
> select contract , sum(amlp) from maintenance where contract=(select
> contract
> from maintenance group by contract);
>
> But that resulted in a "ERROR 1242 (21000): Subquery returns more than 1
> row" error.
>
> Any suggestions?
>
> Hagen Finley
>
> Boulder
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=omelnyk@gmail.com
>
>


--
Sincerely yours,
Olexandr Melnyk
http://omelnyk.net/


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org