I need help with a complicated query. I have a Venues table, a Tag table and a Venues_Tag_lookup table. When I have the detail of a single venue on screen I would like to be able to show other venues that are similar to the current venue.
This will require a query that returns the top 5 venues with the most amount of matching tags. (I’m using MSSQL)
Here is a simple layout of how my tables look.
Venues_tbl
----------
VenueId
Venue_name
Tag_tbl
---------
TagId
Tag_name
Venues_Tag_lookup
------------------
Venue_tagId
VenueId
TagId
If you have any question please ask.
Thanks in advance.
1 Answer