sql query - how to apply limit within group by

后端 未结 5 1199
生来不讨喜
生来不讨喜 2020-12-09 17:03

I have a table named t1 with following fields: ROWID, CID, PID, Score, SortKey

it has the following data:

1, C1, P1, 10, 1
2, C1, P2, 20, 2
3, C1, P3         


        
5条回答
  •  轮回少年
    2020-12-09 18:04

    We can use LIMIT clause in SQLite. For example :

    select * from tableName where field1='something' limit 10;
    

    this gives the 10 first rows.

提交回复
热议问题