Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
Can Multiple Columns Be Used in GROUP BY
Can Multiple Columns Be Used in GROUP BY? - Oracle DBA FAQ - Understanding SQL SELECT Query Statements
✍: FYIcenter.com
You can use multiple columns in the GROUP BY clause as shown in the following example. It returns how many employees are having the same salary in each department:
SQL> SELECT department_id, salary, count(*) 2 FROM employees GROUP BY department_id, 3 salary HAVING count(*) > 1; DEPARTMENT_ID SALARY COUNT(*) ------------- ---------- ---------- 90 17000 2 50 3200 4 50 2200 2 50 3600 2 80 10500 2 80 9000 2 50 2700 2 ......
2007-04-20, 4716👍, 0💬
Popular Posts:
.NET INTERVIEW QUESTIONS - What is COM ? Microsoft’s COM is a technology for component software deve...
.NET INTERVIEW QUESTIONS - What is COM ? Microsoft’s COM is a technology for component software deve...
Enable ASP.NET polling using “web.config” file Now that all our database side is configured in order...
How To Analyze Tables with "mysqlcheck"? - MySQL FAQs - Administrator Tools for Managing MySQL Serve...
Can we use the constructor, instead of init(), to initialize servlet? Yes , of course you can use th...