Monday, February 13, 2012

Access help.

I am a beginning programmar using Access. I need help defining creating a query that shows the number of items from a particular field as there are many of the same items. As well as create seperate listings for each item as they are also located under different location keys. Can anyone help???

This question sounds pretty basic and I feel really dumb for asking.Look at the following 2 functions: count(*) and group by

col has values 1,3,6,1,2,1,1,3

e.g. - select col, count(*) from table group by col

would return:

col count(*)
1 4
2 1
3 2
6 1|||does the same rule apply when you are trying to sort 2 columns by count.

ex.

col 1 - High School 1, high school 2 high school 3
col 2- IIe, IIe, iMac, II, HP HP, IIe, IIe, iMac, II, HP HP
col 3 - count

I am trying to create a count list for: high school 1, 2 and 3.

Jeremy

Originally posted by rnealejr
Look at the following 2 functions: count(*) and group by

col has values 1,3,6,1,2,1,1,3

e.g. - select col, count(*) from table group by col

would return:

col count(*)
1 4
2 1
3 2
6 1

No comments:

Post a Comment