I’m pulling some data from a forum and use it to display comments on my site.
The first row (post) might come from a dummy username but it doesn’t have to.
Example:
id username post
-------------------------
9 dummy Hello World!
12 user hi!
...
OR
id username post
-------------------------
14 user1 hi!
19 user2 hello!
...
Now let’s say I want to get the first ten rows/posts but not first row should not be retrieved if it comes from the dummy user. The dummy user may post another post later and such posts should be retrieved (so a simple WHERE username != 'dummy' doesn’t do the trick).
Is there a simple way to accomplish this with a single SQL query? Solution using two queries is obvious.
Thanks!
Take 10 posts, starting from the first non-dummy post