my dog learned polymorphism*
The moose likes JDBC and the fly likes SQL count statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL count statement" Watch "SQL count statement" New topic

SQL count statement

Henry ostley

Joined: Mar 04, 2012
Posts: 4
Is it possible in a count statement to return the value that is being counted as well as the actual number of times it appears?
So for instance:
Oxford 4
Cambridge 7
LSE 14
Martin Vajsar

Joined: Aug 22, 2010
Posts: 3610

Something along the lines of might fit your need, if I understood it correctly.

An SQL tutorial might come in handy.
Don't get me started about those stupid light bulbs.
subject: SQL count statement