Another +1 on the "awestruck"!
Malcolm
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On 7/2/2010 10:09 AM, P Kishor wrote:
> I was going to add "That is an Igor-question" to "I don't know how to
> do that with sql." I have no idea how you do this, but if ever I meet
> you in person, I will be too awestruck to say anything beyond
> "SELECT.."
>
From me it would more likely be
Igor Tandetnik wrote:
> P Kishor wrote:
>> I think what Peng wants is that given table of type_id
>>
>> 5
>> 5
>> 5
>> 5
>> 5
>> 4
>> 4
>> 4
>> 7
>> 7
>> 8
>> 8
>> 8
>> 8
>>
>> if 'n' is 3, the desired result is
>>
>> 5
>> 5
>> 5
>> 4
>> 4
>> 4
>> 7
>> 7
>> 8
>> 8
>> 8
>>
>> I don't know how
On Fri, Jul 2, 2010 at 12:06 PM, Igor Tandetnik wrote:
> P Kishor wrote:
>> I think what Peng wants is that given table of type_id
>>
>> 5
>> 5
>> 5
>> 5
>> 5
>> 4
>> 4
>> 4
>> 7
>> 7
>> 8
>> 8
>> 8
>> 8
>>
>> if 'n' is 3, the desired result is
>>
>> 5
>> 5
>> 5
>> 4
>> 4
>> 4
>> 7
>> 7
>> 8
>> 8
On 2 Jul 2010, at 6:06pm, Igor Tandetnik wrote:
> select type_id from foods f1
> where (
>select count(*) from foods f2
>where f2.type_id = f1.type_id
> and f2.rowid < f1.rowid) < 3;
Clever.
Simon.
___
sqlite-users mailing list
sqlite-use
P Kishor wrote:
> I think what Peng wants is that given table of type_id
>
> 5
> 5
> 5
> 5
> 5
> 4
> 4
> 4
> 7
> 7
> 8
> 8
> 8
> 8
>
> if 'n' is 3, the desired result is
>
> 5
> 5
> 5
> 4
> 4
> 4
> 7
> 7
> 8
> 8
> 8
>
> I don't know how to do that with sql.
Well, if you insist:
select type_i
6 matches
Mail list logo