Help to remove all posts with a list of tags, I hope the screenshot will be visible, and it is clear how the database is arranged.

enter image description here

Closed due to the fact that participants are off topic Alexey Shimansky , pavel , aleksandr barakin , Streletz , user194374 Aug 29 '16 at 5:55 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - Alexey Shimansky, pavel
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Andrew, show what you have already done, and tell us what your result does not suit you. - Gleb Kemarsky
  • @ Andrei Shostik, pictures instead of text are not welcome here. - Visman
  • @Visman, thank you, I will take into account - Andrey Shostyk
  • 2
    I vote for the closure of this question, since the answer to it can hardly be useful to anyone other than the author of the question. - aleksandr barakin

1 answer 1

SELECT * FROM posts p JOIN posts_tags pt ON pt.post_id = p.id JOIN tags t ON t.id = pt.tag_id ORDER BY t.tag_name