This question already has an answer here:

How to get the table structure which is present in the answer of the post?

This self-left-join is returning more records than I expected it to

marked as duplicate by Time Traveling Bobby, Martijn Pieters, Rory, Toon Krijthe, BinaryMisfit Mar 27 '13 at 11:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


This is the facility of SQLFiddle

Just run query as Plaintext Output

enter image description here


Try this website, Just put you plain text. it will give you exact same output you want


Not the answer you're looking for? Browse other questions tagged .