Re: Reporting the number of duplicates in a list of numbers?

2014-05-05 Thread Alex Tweedly
I'm the biggest fan there is of arrays - but for this problem an array looks like overkill - see the simple code below. (btw - not actually tested, so beware typos) put empty into tCounted put empty into tLast repeat for each line L in tData if L = tLast then add 1 to tCount else

Re: Reporting the number of duplicates in a list of numbers?

2014-05-04 Thread Peter Haworth
If you're using an sql db: SELECT , count(*) AS C FROM GROUP BY < thewordnumber > ORDER BY C DESCENDING Returns the word numbers and count sorted by count high to low. Pete lcSQL Software On May 4, 2014 8:47 PM, "JOHN PATTEN" wrote: > Thanks Kay! > > That’s what I needed. I knew it was prett

Re: Reporting the number of duplicates in a list of numbers?

2014-05-04 Thread JOHN PATTEN
Thanks Kay! That’s what I needed. I knew it was pretty simple, but my unfamiliarity with arrays prevented me from seeing the solution. Cheers! John Patten SUSD On May 4, 2014, at 8:14 PM, Kay C Lan wrote: > This might get you started, in the msg box: > > put "3,5,6,6,24,24,24,33,130,109" i

Re: Reporting the number of duplicates in a list of numbers?

2014-05-04 Thread Kay C Lan
This might get you started, in the msg box: put "3,5,6,6,24,24,24,33,130,109" into tData --if the data comes from the db as seperate lines, then --repeat for each line tRecord in tData --if data comes in from db as a list repeat for each item tRecord in tData add 1 to aCount[tRecord] end repeat -

Reporting the number of duplicates in a list of numbers?

2014-05-04 Thread JOHN PATTEN
Hi All… I am attempting to get the total number of times specific words in a text passage are selected by students. The way I’m doing this is by recording the word numbers selected by each student and storing them in a database. I end up with list of numbers representing the selected words, so