How to select a limited amount of rows for each foreign key?

前端 未结 4 835
忘掉有多难
忘掉有多难 2021-01-06 10:19

I have this table:

id
feed_id
...

Let\'s say that I have 500 rows and I want to select 3 entries for each feed_id? And 50 as total limit.

4条回答
  •  醉话见心
    2021-01-06 10:31

    In transact SQL you would use the TOP statement, not sure if that applies here ...

提交回复
热议问题