List:General Discussion« Previous MessageNext Message »
From:Rik Wasmus Date:December 5 2011 10:20am
Subject:Re: How to get a specific number of entries per one key ?
View as plain text  
Taking the question _very_ literal:

> A quick guess, or at least a starting point:
> 
> SELECT key, data

, SUBSTRING_INDEX(GROUP_CONCAT(data ORDER BY data SEPARATOR ','),',',2)

> FROM myTable
> GROUP BY key

<remove limit here>
-- 
Rik Wasmus
Thread
delete syntaxTim Dunphy2 Dec
  • Re: delete syntaxKrishna Chandra Prajapati2 Dec
    • Re: delete syntaxTim Dunphy2 Dec
      • Re: delete syntaxShiva2 Dec
        • Re: delete syntaxReindl Harald2 Dec
          • Re: delete syntaxStdranwl2 Dec
            • Re: delete syntaxReindl Harald2 Dec
              • Re: delete syntaxClaudio Nanni2 Dec
                • Re: delete syntaxReindl Harald2 Dec
                  • Re: delete syntaxGovinda2 Dec
                    • How to get a specific number of entries per one key ?Blog Tieng Viet3 Dec
                      • Re: How to get a specific number of entries per one key ?Arthur Fuller3 Dec
                        • Re: How to get a specific number of entries per one key ?Rik Wasmus5 Dec
    • Re: delete syntaxKeith Keller2 Dec