473,407 Members | 2,315 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,407 software developers and data experts.

Frequency Distribution

RFJ
I've got a list of annual turnovers for about fifty companies and I want to
summarise them by bands. A simple version would be : eg:

Annual_Turnover Count
Up to 5million 5
5 to 10 million 37
10 to 20 million 8

As a relative beginner in Access (XP) this is stretching me. Can SKS point
me in the right direction.

TIA

Rob
Nov 13 '05 #1
9 4648
Air coded:

SELECT IIf(Annual_Turnover < 5000000, "Up to 5 million", IIf(Annual_Turnover
< 10000000, "5 to 10 million", IIf(Annual_Turnover < 20000000, "10 to 20
million", "More than 20 million"))) AS Annual_Turnover, COUNT(*) AS Count_
FROM YourTable
GROUP BY IIf(Annual_Turnover < 5000000, "Up to 5 million",
IIf(Annual_Turnover < 1000000, "5 to 10 million", IIf(Annual_Turnover <
2000000, "10 to 20 million", "More than 20 million")))

HTH

Yannick

"RFJ" <rf*****@ntllworld.com> wrote in message
news:Fr***************@newsfe4-gui.ntli.net...
I've got a list of annual turnovers for about fifty companies and I want to summarise them by bands. A simple version would be : eg:

Annual_Turnover Count
Up to 5million 5
5 to 10 million 37
10 to 20 million 8

As a relative beginner in Access (XP) this is stretching me. Can SKS point
me in the right direction.

TIA

Rob

Nov 13 '05 #2
RFJ
Tx guys for the help - problem solved <G>

Rob
"RFJ" <rf*****@ntllworld.com> wrote in message
news:Fr***************@newsfe4-gui.ntli.net...
I've got a list of annual turnovers for about fifty companies and I want to summarise them by bands. A simple version would be : eg:

Annual_Turnover Count
Up to 5million 5
5 to 10 million 37
10 to 20 million 8

As a relative beginner in Access (XP) this is stretching me. Can SKS point
me in the right direction.

TIA

Rob

Nov 13 '05 #3
"RFJ" <rf*****@ntllworld.com> wrote in message news:<jx***************@newsfe5-gui.ntli.net>...
Tx guys for the help - problem solved <G>

Rob
"RFJ" <rf*****@ntllworld.com> wrote in message
news:Fr***************@newsfe4-gui.ntli.net...
I've got a list of annual turnovers for about fifty companies and I want

to
summarise them by bands. A simple version would be : eg:

Annual_Turnover Count
Up to 5million 5
5 to 10 million 37
10 to 20 million 8

As a relative beginner in Access (XP) this is stretching me. Can SKS point
me in the right direction.

TIA

Rob


Although your problem has already been solved, I'll write an Access 97
program to create a histogram pdf. You can replace my calculations
with a nice SQL statement if you'd like. I'll email you a zipped mdb
if the code gets longer than a few pages. It'll show the min, max and
count of the data, then let you select the min, max and number of
class intervals for the histogram.

James A. Fortune
Nov 13 '05 #4
James,

I would appreciate you C/C me on this. I'd like to see how you do it.

Steve
PC Datasheet
re******@pcdatasheet.com
"James Fortune" <ja******@oakland.edu> wrote in message
news:a6**************************@posting.google.c om...
"RFJ" <rf*****@ntllworld.com> wrote in message

news:<jx***************@newsfe5-gui.ntli.net>...
Tx guys for the help - problem solved <G>

Rob
"RFJ" <rf*****@ntllworld.com> wrote in message
news:Fr***************@newsfe4-gui.ntli.net...
I've got a list of annual turnovers for about fifty companies and I want

to
summarise them by bands. A simple version would be : eg:

Annual_Turnover Count
Up to 5million 5
5 to 10 million 37
10 to 20 million 8

As a relative beginner in Access (XP) this is stretching me. Can SKS point
me in the right direction.

TIA

Rob


Although your problem has already been solved, I'll write an Access 97
program to create a histogram pdf. You can replace my calculations
with a nice SQL statement if you'd like. I'll email you a zipped mdb
if the code gets longer than a few pages. It'll show the min, max and
count of the data, then let you select the min, max and number of
class intervals for the histogram.

James A. Fortune

Nov 13 '05 #5
"PC Datasheet" <no****@nospam.spam> wrote in message news:<xc****************@newsread2.news.atl.earthl ink.net>...
James,

I would appreciate you C/C me on this. I'd like to see how you do it.

Steve
PC Datasheet
re******@pcdatasheet.com


I cc'd you. The program still needs a little work on putting more
numbers in for the class frequencies and class intervals, but I think
it'll be a useful program that also demonstrates a little of what can
be done by outputting pdf from Access. Note that I have the highest
bar using about 90% of the available graph height so autogenerated
y-axis numbers will be slightly tougher. The program used the same
module code as before (except I swapped cropbox and mediabox numbers
to get landscape mode) plus about five pages of code behind the form.
I've also done programs that output pdf files with multiple pages,
images, pdf info, report detail capability and image compression that
display database information quite nicely and compactly. I envision
web pages accessing pdf files that that can be automatically
regenerated by Access using the latest data and the latest pictures.

James A. Fortune
Nov 13 '05 #6
RFJ
Tx James - look forward to getting the code.

Rob

"James Fortune" <ja******@oakland.edu> wrote in message
news:a6**************************@posting.google.c om...
"RFJ" <rf*****@ntllworld.com> wrote in message

news:<jx***************@newsfe5-gui.ntli.net>...
Tx guys for the help - problem solved <G>

Rob
"RFJ" <rf*****@ntllworld.com> wrote in message
news:Fr***************@newsfe4-gui.ntli.net...
I've got a list of annual turnovers for about fifty companies and I want
to
summarise them by bands. A simple version would be : eg:

Annual_Turnover Count
Up to 5million 5
5 to 10 million 37
10 to 20 million 8

As a relative beginner in Access (XP) this is stretching me. Can SKS

point me in the right direction.

TIA

Rob


Although your problem has already been solved, I'll write an Access 97
program to create a histogram pdf. You can replace my calculations
with a nice SQL statement if you'd like. I'll email you a zipped mdb
if the code gets longer than a few pages. It'll show the min, max and
count of the data, then let you select the min, max and number of
class intervals for the histogram.

James A. Fortune

Nov 13 '05 #7
"RFJ" <rf*****@ntllworld.com> wrote in message news:<zB***************@newsfe2-gui.ntli.net>...
Tx James - look forward to getting the code.

Rob


I made some changes to the code but the email to you bounced. I don't
want to post five pages of code. Does anyone have a nice ftp site I
could use to make a zipped Access 97 mdb file available? If not, I'll
talk to Keith Peterson at www.simtel.net about putting it there. BTW,
Keith and I used to work for Academic Computer Services at Oakland U.
when oak.oakland.edu was a mirror for simtel. This program is a lot of
fun. I plan to keep improving the code. Also, is anyone interested
in a cumulative frequency distribution (a.k.a., ogive). Since the
histogram information is already there it would be pretty easy to add
it as a second page of the pdf file.

James A. Fortune
Nov 13 '05 #8
ja******@oakland.edu (James Fortune) wrote in message news:<a6**************************@posting.google. com>...
talk to Keith Peterson at www.simtel.net about putting it there. BTW,


Oops. That's Petersen. He hasn't posted to an internet group since
Nov 2000. He might be retired. I emailed him at an address from that
post. I remember once when the email program on vela.acs.oakland.edu
went down temporarily. "No problem." he said, "Just use smtp." Keith
was one of several talented people that gravitated to O.U. when it was
gaining a strong internet presence. I was the one who suggested to
Bill Watt that O.U. get on the internet when I discovered that the
only practical way to send data from my 5 1/4" floppy to Boston was
via the USPS since Kermit at 300 baud was the only other option
available. When O.U. got a great connection to the internet, Keith
saw an opportunity to make SimTel (probably the world's largest
software repository) available at much faster connection speeds than
before. O.U. also had a huge repository of SCO UNIX software.

James A. Fortune
Nov 13 '05 #9
ja******@oakland.edu (James Fortune) wrote in message news:<a6**************************@posting.google. com>...
ja******@oakland.edu (James Fortune) wrote in message news:<a6**************************@posting.google. com>...
talk to Keith Peterson at www.simtel.net about putting it there. BTW,


Oops. That's Petersen. He hasn't posted to an internet group since
Nov 2000. He might be retired. I emailed him at an address from that
post. I remember once when the email program on vela.acs.oakland.edu
went down temporarily. "No problem." he said, "Just use smtp." Keith
was one of several talented people that gravitated to O.U. when it was
gaining a strong internet presence. I was the one who suggested to
Bill Watt that O.U. get on the internet when I discovered that the
only practical way to send data from my 5 1/4" floppy to Boston was
via the USPS since Kermit at 300 baud was the only other option
available. When O.U. got a great connection to the internet, Keith
saw an opportunity to make SimTel (probably the world's largest
software repository) available at much faster connection speeds than
before. O.U. also had a huge repository of SCO UNIX software.

James A. Fortune


Here is a sample output from Histogram.mdb. It's a work in progress.
I'm not sure if the newsreader will strip out what's necessary to view
it or not.

'------------begin output.pdf--------------------
%PDF-1.4%ßÌÑÀRÝ

1 0 obj
<< /Type /Catalog
/Outlines 2 0 R
/Pages 3 0 R
endobj

2 0 obj
<< /Type /Outlines
/Count 0 endobj

3 0 obj
<< /Type /Pages
/Kids [4 0 R]
/Count 1 endobj

4 0 obj
<< /Type /Page
/Parent 3 0 R
/MediaBox [0 0 792 612]
/CropBox [0 0 792 612]
/Rotate 0
/Contents [ 5 0 R]
/Resources << /ProcSet 6 0 R
/Font 7 0 R
endobj

5 0 obj
<< /Length 752 >>
stream

%Title
BT
/F1 20 Tf
276 554 Td
(Histogram: tbl2003.TOTAAMT) Tj
ET
144 144 576 396 re
s
%Y-Axis Label
BT
/F1 14 Tf
52 370 Td
(Class) Tj
ET
BT
/F1 14 Tf
32 350 Td
(Frequency) Tj
ET
%X-Axis Label
BT
/F1 14 Tf
369 72 Td
(Class Intervals) Tj
ET
q
1 0.75 0.5 rg
192 144 48 158.22 re B Q
q
0.5 0.75 1 rg
240 144 48 338.82 re B Q
q
1 0.75 0.5 rg
288 144 48 356.4 re B Q
q
0.5 0.75 1 rg
336 144 48 287.68 re B Q
q
1 0.75 0.5 rg
384 144 48 180.6 re B Q
q
0.5 0.75 1 rg
432 144 48 132.65 re B Q
q
1 0.75 0.5 rg
480 144 48 83.11 re B Q
q
0.5 0.75 1 rg
528 144 48 59.13 re B Q
q
1 0.75 0.5 rg
576 144 48 46.35 re B Q
q
0.5 0.75 1 rg
624 144 48 28.77 re B Q
%Xmin number
BT
/F1 12 Tf
177.6 120 Td
(0.00) Tj
ET
%Xmax number
BT
/F1 12 Tf
643.2 120 Td
(30000.00) Tj
ET
endstream
endobj

6 0 obj
<< /Procset [/PDF /Text] >>
endobj

7 0 obj
<<
/F1 8 0 R endobj
8 0 obj
<<
/BaseFont/Courier/Type/Font/Name/F1
/Encoding /WinAnsiEncoding
/Subtype/Type1 endobj

xref
0 9
0000000000 65535 f
0000000017 00000 n
0000000095 00000 n
0000000150 00000 n
0000000220 00000 n
0000000422 00000 n
0000001228 00000 n
0000001274 00000 n
0000001311 00000 n

trailer
<< /Size 9
/Root 1 0 R


startxref
1427

%%EOF
'------------end output.pdf--------------------
James A. Fortune
Nov 13 '05 #10

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

Similar topics

9
by: christopher diggins | last post by:
I would like to survey how widespread the usage of smart pointers in C++ code is today. Any anecdotal experience about the frequency of usage of smart pointer for dynamic allocation in your own...
11
by: NC Tim | last post by:
Hello, I think the question i have is fairly straightforward, but I can't seem to replicate the old SAS frequency procedure when I try to accomplish this in MS Access. anyway, i have about 10...
19
by: jason_box | last post by:
I'm alittle new at C and I'm trying to write a simple program that will record the frequency of words and just print it out. It is suppose to take stdin and I heard it's only a few lines but I'm...
12
by: kabradley | last post by:
Hello, Thanks for looking at my post and hopefully having an answer or at least a suggestion to my problem. I currently work at a financial planning office that deals with many clients and accounts....
7
by: Udhay | last post by:
How to get the frequency of an audio file and how to separate the low and high frequency of an audio file
8
by: Andrew Savige | last post by:
I'm learning Python by reading David Beazley's "Python Essential Reference" book and writing a few toy programs. To get a feel for hashes and sorting, I set myself this little problem today (not...
13
by: umpsumps | last post by:
Hello, Here is my code for a letter frequency counter. It seems bloated to me and any suggestions of what would be a better way (keep in my mind I'm a beginner) would be greatly appreciated.. ...
0
by: eGenix Team: M.-A. Lemburg | last post by:
________________________________________________________________________ ANNOUNCING eGenix.com mx Base Distribution Version 3.1.1 for Python 2.6 Open Source Python extensions providing...
0
by: M.-A. Lemburg | last post by:
Just to let you know: we also provide binaries and support for Mac OS X Intel and PPC. Thanks to Joe Strout for pinging us about this. On 2008-10-15 17:41, eGenix Team: M.-A. Lemburg wrote: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.