0

Info used below: x = int y = string

I'm trying to

SELECT x FROM table

Now this is basic enough. However i want to only select 10, which again is simple enough. However I want to select 10 of each y. What do i mean?

SELECT x FROM table ORDER BY y LIMIT 10;

Now this would return 10 rows, however I want to get 10 x values for every y value.

You can imagne the table like this:

enter image description here

Now theoretically I would have 30 different Y values and i would like to get 10 X values for every Y value. Is this at all possible? If so how would I go about it?

  • Similar question have been asked [here](http://stackoverflow.com/questions/14014362/select-several-records-for-each-distinct-one-in-a-single-query). – k.d Jul 30 '15 at 09:15
  • So for example you wana take all `x` values where value `Baby` in `y` column ? – Vladimir Djukic Jul 30 '15 at 09:45

0 Answers0