Re: Group by
>i am sorry i dont know which part you dont get it.
2 <> 3
SELECT * FROM my_table;
+---------+----------+------------+
| intrunk | calldrop | date |
+---------+----------+------------+
| 1 | 10 | 2012-03-04 |
| 1 | 16 | 2012-03-04 |
| 1 | 31 | 2012-03-04 |
| 1 | 31 | 2012-03-05 |
| 5 | 16 | 2012-03-05 |
+---------+----------+------------+
SELECT intrunk
, date
, SUM(calldrop IN(16,31)) total
FROM my_table
GROUP
BY intrunk
, date;
+---------+------------+-------+
| intrunk | date | total |
+---------+------------+-------+
| 1 | 2012-03-04 | 2 |
| 1 | 2012-03-05 | 1 |
| 5 | 2012-03-05 | 1 |
+---------+------------+-------+
Subject
Written By
Posted
Re: Group by
March 27, 2012 06:52AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.