I have to get from a table containing something like
ShopId ArticleId Price ArticleName
1 1a 2.00 Fahrrad
1 1b 3.00 Fahrrad
1 1c 4.00 Fahrrad
1 1d 9.99 Fahrrad
2 2a 2.00 Fahrrad
2 2b 3.10 Fahrrad
2 2c 3.50 Fahrrad
2 2d 9.99 Fahrrad
max. 3 ArticleId's per ShopId ordered by min. Price as result, e.g.:
ShopId ArticleId Price ArticleName
1 1a 2.00 Fahrrad
1 1b 3.00 Fahrrad
1 1c 4.00 Fahrrad
2 2a 2.00 Fahrrad
2 2b 3.10 Fahrrad
2 2c 3.50 Fahrrad
Can anyone please help?
So it's something like min(Price
) and group by ShopId
but with 3 results not 1.