I have a table
+-----------------------------+---------------+-----------+
| Painter | Painting | Rate |
+-----------------------------+---------------+-----------+
| Zinaida Serebriakova | Window | 5 |
| Zinaida Serebriakova | Florence | 1 |
| Zinaida Serebriakova | Nude | 8 |
| Zinaida Serebriakova | Bath | 4 |
| Thomas And William Daniell | Turbine Makers| 2 |
| Thomas And William Daniell | George Iain | 7 |
| Thomas And William Daniell | Flax Pullers | 3 |
| Robert Motherwell | Galleons | 1 |
| Robert Motherwell | Ulysses | 2 |
+-----------------------------+---------------+-----------+
I need to get 2 paintings for each painter with the highest rate.
+-----------------------------+---------------+-----------+
| Painter | Painting | Rate |
+-----------------------------+---------------+-----------+
| Zinaida Serebriakova | Nude | 8 |
| Zinaida Serebriakova | Window | 5 |
| Thomas And William Daniell | George Iain | 7 |
| Thomas And William Daniell | Flax Pullers | 3 |
| Robert Motherwell | Ulysses | 2 |
| Robert Motherwell | Galleons | 1 |
+-----------------------------+---------------+-----------+
And delete everything else!
Best Answer
fiddle