Note that there are some explanatory texts on larger screens.

plurals
  1. POGet N rows of a group / thread / topic
    text
    copied!<p>I'm looking for a right mysql query for my website <a href="http://watiseropderadio.nl" rel="nofollow">http://watiseropderadio.nl</a> (in dutch). It's a website to find out what songs have been played on the popular radio's in Holland.</p> <p>I want to make a query what returns 13 rows for each radiostation. There are 8 different radiostation.</p> <p>This is my table:</p> <pre><code>id | radioname | time | artist | song -------------------------------------------------------------- 23421 | radio 538 | 19:34 | Queen | Bohemian 23422 | radio veronica | 19:35 | Rammstein | Blablabla 23423 | slam fm | 19:34 | Roxette | Blablabla 23424 | 3fm | 19:34 | Blabla | Blablabla .... </code></pre> <p>It's a table with 3,000,000+ records and with these key's:</p> <pre><code>PRIMARY PRIMARY 3083007 id radioname INDEX 8 radioname track with artist INDEX 23715 artist song </code></pre> <p>This what I want to be the output:</p> <pre><code>id | radioname | time | artist | song -------------------------------------------------------------- 23455 | radio 538 | 19:30 | Blabla | Blablabla 23470 | radio 538 | 19:33 | Blabla | Blablabla 23484 | radio 538 | 19:36 | Blabla | Blablabla 23498 | radio 538 | 19:38 | Blabla | Blablabla total 13 x .... 23456 | radio veronica | 19:29 | Blabla | Blablabla 23476 | radio veronica | 19:32 | Blabla | Blablabla 23483 | radio veronica | 19:36 | Blabla | Blablabla 23495 | radio veronica | 19:39 | Blabla | Blablabla total 13 x .... </code></pre> <p>The order of the result doesn't matter and the query has to be fast. I like to try it myself, but this is a little to much for me.</p> <p>I don't know if the key's are goed for this job, can someone gives some advise?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload