I need your help with the following question, not sure if it's possible:
I have a sql table like this:
|**id** |**word**|
|--- | ---|
|1 | axxxx|
|2 | a.....|
|. | a...|
|. | a....|
|. | a..|
|1000 | a....|
|1001 | b.....|
|1002 | bxxxxx|
|. | b...|
|. | b..|
|. | .|
|60000 | z.....|
|.. | z..|
Basically, the field named 'word' contains words from A to Z and these has been already ordered alphabetical. So i need build a query which returns the first 3 rows by each letter, and example would be:
|**word**|
|---|
|ab|
|abc|
|abcd|
|bc|
|bcd|
|bcde|
|cd|
|cde|
|cdef|
I've tried several ways but didn't succeed, and at this point I'm not sure if that is really possible do it with a single query.
Thanks in advance, I'll really appreciate your advice and help.