I have used cross joins when making a calendar [years] cross join [months]
join and table hint would be nice to have a good example of
I know a left loop join can speed up a query if there are good indexes and the table a small. Where if you have a lot of data a left hash join will be better
Other functions that go with joins would be nice to go over also
CTE tables which if needed you can use joins and union all to create a transverse query. This for me came in handy when creating a Bill Of Materials, that had a parent child relationship that then a child could be a parent
Also another great tool is Cross/Outer apply. Like a left/inner join but you filter the table by row. This is nice when you have a header and detail table and you only need the header info but aggregate one or more columns in the details table. Or if you have a table function or that you need to join to this a good way to do that
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.