I have 10 users in a DB. Each user can post as many links as he wants. Each user can see all the links posted by the other users.
If one user clicks on a link, ex: google.com, he'll not see it again, but those users who haven't clicked that link, they can still click that link.
For this I have 2 tables (perhaps they are badly built, besides they are not related with foreign keys).
linksPosted
id | link | user
1 g.com john
2 h.com patrick
...
clicksMade
id | link | user
1 g.com jack
2 h.com nick
...
So, ALL the links posted can be seen by all the users among them. Everytime a link is posted, this will be added to linksPosted table. OK. Then, for example, if Jack click g.com, Jack will be able to see other links from other users, but g.com will not appear again for him, because he has clicked it, but Nick will be able to click g.com because he hasn't clicked it.
How can I do this in a SQL query?
Thanks.