File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
this week in the
to get the most repeated column name
Joined: Nov 04, 2007
Feb 19, 2008 05:05:00
I have lot of products ordered by the user.Some of them are repeated.
How to get the most 5 frequently ordered products from the column named Product.
Joined: May 26, 2003
Feb 19, 2008 16:23:00
This query gives you the number of each distinct products. You want to add a clause to get the first 5 rows. This part varies by database.
select product, count(*) as "num" from products order by num desc
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: to get the most repeated column name
Checking a string
SQL for the top 2 most recurring values in a column
Am I ready?
displaying the most highly repeated entry in an ArrayList
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014