[sqlite] Top 10 distinct record count

2007-03-02 Thread Hikka W
Dear list Quite new to sqlite/sql - and just signed the list. Have a logtable where I need a TOP 10 output of the most representet field 'file' WHERE the field 'type' is specific. 'file' is the text of a filepath or name, and 'type' is also text... I relize by searching the list that LIMIT can

Re: [sqlite] Top 10 distinct record count

2007-03-02 Thread Brodie Thiesfield
Perhaps this is what you are after? select file, count(file) from logtable where type = 'specific' group by file order by 2 desc limit 10; Hikka W wrote: Dear list Quite new to sqlite/sql - and just signed the list. Have a logtable where I need a TOP 10 output of the most representet field

Re: [sqlite] Top 10 distinct record count

2007-03-02 Thread Hikka W
Brodie, :) That was very fast - and exactly the needed call. Tks. a lot. 2007/3/2, Brodie Thiesfield [EMAIL PROTECTED]: Perhaps this is what you are after? select file, count(file) from logtable where type = 'specific' group by file order by 2 desc limit 10; Hikka W wrote: Dear list