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, probl
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
wrote:
> I've written a helpdesk ticket problem and am working
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 accepted_by
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;
---
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:
++--+--+-+-+-
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.
I have a MySQL table:
++--+--+-+-++
| Field | Type | Null | Key | Default | Extra |
++--+--+-+-++
| id | int(10) unsigned | | PRI | NULL