473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Finding top x percent of data

I am trying to do the following w/ SQL for db2 9...
I want to find the top x percent of rows. For example, if i wanted to
find the average sale price of the top 10 most expensive items in a
store, how could I go about doing that, w/o a stored procedure? I've
been searching, and have come across many solutions for other RDBMS,
but not yet for DB2.

Thanks in advance.
Dec 5 '07 #1
1 1858
Could you give us a solution in other RDBMS that does successfully
what you want to achieve?

Cheers,
Sanjuro

On Dec 5, 2:18 pm, nyc...@yahoo.com wrote:
I am trying to do the following w/ SQL for db2 9...
I want to find the top x percent of rows. For example, if i wanted to
find the average sale price of the top 10 most expensive items in a
store, how could I go about doing that, w/o a stored procedure? I've
been searching, and have come across many solutions for other RDBMS,
but not yet for DB2.

Thanks in advance.
Dec 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: MX1 | last post by:
Hi all, I've setup a table with one field that will hold percent values. The type is number and the format is percent on the field. When I do data entry directly into the field, I have to put...
3
by: D Denholm | last post by:
I am a Access newbie... Hopefully somebody can help me figure this out. I have a database that looks like: Asset Economic Minimum ----- ---------------- 10555 ...
3
by: Nothing | last post by:
This is going to be a really stupid question, but I am having a problem with the percent format in a control on a form. My end goal is that I want the user to enter 17 and have the control...
2
by: mhodkin | last post by:
I created a query in which I have grouped data by City. I wish to calculate the percent of each value, e.g. City/(Total count of all Cities), in tbe next column of the query. I can't seem to...
39
by: VidTheKid | last post by:
THE PROBLEM The % symbol is too vague when defining dimensions in CSS and HTML. It can relate to an inherited value, a measure of the containing element (which can differ between box models) or...
14
by: prasadjoshi124 | last post by:
Hi All, I am writing a small tool which is supposed to fill the filesystem to a specified percent. For, that I need to read how much the file system is full in percent, like the output given...
0
by: NerdRunner | last post by:
My ASP.NET application contains a form with drop lists for filtering data. The lists are populated from views in SQL Server 2000. One view includes a sort command and selcts the Top 100 Percent...
7
by: Bernice J | last post by:
I have a table with four fields: BlockNo, District, SubDate, Status. I would like to create a report that 1)shows the percent of BlockNo that has a SubDate(IsNotNull) grouped by District and 2) shows...
4
by: gagnonconsulting | last post by:
Hi, This is driving me crazy, but I am sure I am missing something simple. I have built an Access 2007 report that shows 2 rows of sales data from each of a bunch of store locations. My table has...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.