Jump to content

JOIN's are making my brain hurt :) oh GROUPBY?


Demonic

Recommended Posts

Alright I understand how to use a basic "JOIN" clause, but whats up with all this:

 

LEFT JOIN, RIGHT JOIN, INNER JOIN, OUTTER JOIN

 

I'm at the basic join lol whats needed for the other stuff?  While we're on the subject, groupby, I was reading on w3schools about groupby, whats another use for groupby besides averaging results, I only understand GroupBy to be used to average columns and what not.

Link to comment
Share on other sites

LEFT and RIGHT are OUTER joins.

JOIN is an INNER join (it's implied).

 

Usually, I would write INNER JOIN vs. LEFT JOIN to make the distinction.

 

LEFT vs. INNER -- normally, with an INNER join, if there are non-matching rows based on the join condition, no rows will be returned.  With a LEFT join, rows from the first table with non-matching rows will yield NULLed out column for the fields in the second table -- making it possible to find non-matches (like movie reviews without votes, etc.).  RIGHT is the opposite, but the convention is to use LEFT JOIN.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.