how to find 3rd item from list

Hi All,New to Q and wondering how one would get the position of the 3rd 4from list?This get’s the 1st 4 from list:>a: 5 0 2 4 3 2 4 3 5 3 4>a ? 43Not sure how to make an adverb for ? to specify the ith item’sposition to select?Thanks in advance -Joe

where will return list of indexes where condition is true, soq)where a=43 6 10q)(where a=4)[2]10On Nov 12, 6:53?am, lowlyworm <jboh…> wrote:> Hi All,>> New to Q and wondering how one would get the position of the 3rd 4> from list?>> This get’s the 1st 4 from list:>a: ?5 0 2 4 3 2 4 3 5 3 4> >a ? 4>> 3>> Not sure how to make an adverb for ? to specify the ith item’s> position to select?>> Thanks in advance -Joe</jboh…>

charset=us-ascii
X-Mailer: iPhone Mail (8B117)
In-Reply-To:
Message-Id:
Date: Thu, 11 Nov 2010 23:18:00 -0500
To: “personal-kdbplus@googlegroups.com

Mime-Version: 1.0 (iPhone Mail 8B117)

where[4=3Da]2

q)@[where a=4;2]
10
q)(group a)[4;2]
10

regards,

Junan