ou see FROM ["
& gsTableName & "] GROUP BY Year in the statement.
This seems to do the trick.
Thanks ya'll.
:-)
Rick
#>-Original Message-
#>From: sqlite-users-boun...@sqlite.org
#>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik
#>Se
Rick Ratchford
wrote:
> How would you write the SQL statement that would return the maximum
> number of a sample?
>
> For example, if within the SampleNumber column, the SampleNumber 17
> had more records (say there are 23 SampleNumber = 17 in the table,
> more than any other), you wanted to ret
On Tue, 10 Nov 2009 15:28:30 -0500, Pavel Ivanov wrote:
> You're right about max() and group_concat() will not help you either.
> You need something like this:
>
> select max(cnt)
> from (select count(*) as cnt from table_name group by SampleNum)
That'll give you the count of the largest set. But
You're right about max() and group_concat() will not help you either.
You need something like this:
select max(cnt)
from (select count(*) as cnt from table_name group by SampleNum)
Pavel
On Tue, Nov 10, 2009 at 3:24 PM, Rick Ratchford
wrote:
>
> Suppose you had a column called SampleNumber.
>
Suppose you had a column called SampleNumber.
And in this column, you might have...
1
1
1
2
2
2
2
3
3
4
4
4
5
5
5
5
etc.
How would you write the SQL statement that would return the maximum number
of a sample?
For example, if within the SampleNumber column, the SampleNumber 17 had more
records
5 matches
Mail list logo