deleting the last row of the table

I have a q table in which the number of rows can vary. I want to delete the last row everytime. Is there an easy way to do it. Right now i am using

select from testfile where i < (select count i from testfile)

which is not working, q is not able to compare with select count i from testfile

Cheers

dinesh

q)t:( a:til 10; b:-10?10)
q)-1 _ t

Look up http://code.kx.com/wiki/Reference/Underscore

-1_testfile.

if you wanted to do it your original way then use exec instead of select, and remember that row indices begin at 0 and not 1

select from testfile where i < (-1+exec count i from testfile) 

or just

select from testfile where i < -1+count testfile  

or maybe get whacky:

(-1 + count table)#table

thanks.. worked