I've written a helpdesk ticket problem and am working on the statistics
module. I'm having problems with group by. For instance, I want to get
the count of the number of different problem types, by how many were
solved by each person. This is my statement:
mysql select distinct
try this:
select accepted_by, problem_type, count(*) from form
where problem_type is not NULL
AND problem_type != 'Test'
AND accepted_by is not null
group by accepted_by, problem_type
On Wed, Oct 28, 2009 at 12:05 PM, Adam Williams
awill...@mdah.state.ms.us wrote:
I've written a helpdesk
works perfectly, i didn't know you could use multiple columns in the
group by. thanks a bunch!
Michael Dykman wrote:
try this:
select accepted_by, problem_type, count(*) from form
where problem_type is not NULL
AND problem_type != 'Test'
AND accepted_by is not null
group by accepted_by,
how come no one response to my email?
thanks!
My question is below:
Hi,
I have some question on JOIN and INDEX usage on GROUP BY. Hope you can help
me. thanks!
1. If there is any performance differenct for join from a small table to a
big table and join from a big table to a small table?
2. If
At 9:24 -0600 2/5/03, Jaime Teng wrote:
I have a MySQL table:
++--+--+-+-++
| Field | Type | Null | Key | Default | Extra |
++--+--+-+-++
| id
DISTINCT?
-Original Message-
From: Tab Alleman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 12:31 PM
To: Jaime Teng; [EMAIL PROTECTED]
Subject: RE: need help with GROUP BY
SELECT id,account FROM tablename WHERE detail LIKE '%pattern%' GROUP BY
Account;
-Original
SELECT id,account FROM tablename WHERE detail LIKE '%pattern%' GROUP BY
Account;
-Original Message-
From: Jaime Teng [mailto:[EMAIL PROTECTED]]
I have a MySQL table:
...
It should only return *one* result per account.
Jaime,
You should be using the DISTINCT function.
SELECT DISTINCT account, id, FROM etc.
This should give you one instant of 'account' in your SELECT output.
At 09:24 AM 2/5/03 +, Jaime Teng wrote:
I have a MySQL table:
Jaime,
You should be using the DISTINCT function.
SELECT DISTINCT account, id, FROM etc.
This should give you one instant of 'account' in your SELECT output.
At 09:24 AM 2/5/03 +, Jaime Teng wrote:
I have a MySQL table:
I have a MySQL table:
++--+--+-+-++
| Field | Type | Null | Key | Default | Extra |
++--+--+-+-++
| id | int(10) unsigned | | PRI | NULL
10 matches
Mail list logo