Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

NthMostfrequent function Expand / Collapse
Author
Message
Posted Tuesday, June 3, 2008 1:07 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 7:11 AM
Points: 113, Visits: 405
Hi,How to replicate the functionalities of Crystal's NthMostfrequent function in rdl?

thanks
-Meghna
Post #510443
Posted Wednesday, June 4, 2008 8:02 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, July 25, 2014 8:55 AM
Points: 1,615, Visits: 2,118
If you can create a result set that for each item, also has the quantity or frequency of that item, and if you can use SQL 2005, you can then use the ROW_NUMBER function over the item identifier, ordered by the frequency or quantity in descending order. From that result, you simply select the item with ROW_NUMBER of N, for the Nth most frequent. Does that make sense?

Steve
(aka smunson)
:):):)


Steve
(aka sgmunson)

Internet ATM Machine
Post #511392
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse