title: How to make SQL many-to-many same-type relationship table
body: <p>I'm a newbie to SQL and I'm jumping in head first trying to learn as much as possible as I'm coding, which is difficult as I'm designing the database I'll have to live with for a while so I want to make sure I do it right.  I learned the basics of the Many-to-many bridge tables, but what if the two fields are the same type?  Let's say a social network with thousands of users, and how would you create a table to keep track of who is friends with who?  What if there is additional data about each relationship, say... "date friended" for example.  Knowing that there will be queries like "show all friends of userX friended between dateY and dateZ".  My database would have several situations like this and I can't figure out an efficient way to do it.  Since it's coming up a lot for me, I figure others have figured out the best way to design the tables, right?</p>