rastkocvetkovic
Programmer
I'm interested in SQL query that would link the same table twice.
Let's say I have a list of members like this:
Members:
id
name
surname
Rented:
id
movie
member_who_rented_id
member_who_is_renting_id
Now, both members (member_who_rented_id, member_who_is_renting_id) are linking to the same table named Members. Now I want to get all data in one simple query - both name of the member_who_rented_id and member_who_is_renting_id. How could I perform such a query? Thank you in advance for your answers!
Let's say I have a list of members like this:
Members:
id
name
surname
Rented:
id
movie
member_who_rented_id
member_who_is_renting_id
Now, both members (member_who_rented_id, member_who_is_renting_id) are linking to the same table named Members. Now I want to get all data in one simple query - both name of the member_who_rented_id and member_who_is_renting_id. How could I perform such a query? Thank you in advance for your answers!