SQL Learning: Left Outer Joins!

avatar

Hi fellow Hiveians,

Today I wanted to share some really fun, at least for me, learning of SQL and how I learned how to properly do some joins! I also did some cool references as well.

image.png

Hive Divider Bar Text.png

Redacted Learning

Sorry for having redact a lot of the core content of it but one of the things that I just want to point out is there are no red underlines that signify things got screwed up! I was really proud of this work. With the things I work with, I'd rather protect my job and explain what I did than put more information in there than is necessary!

I will hopefully be applying this same knowledge to working with Hive data at some point this fall when I can get more time to breathe at work. I'm able to do what I do now and post but not a heck of a lot outside of that so I'm looking forward to having some opportunity later.

I'm learning how to use statements such as "like" and "between" to narrow my results down to provide things that are useful.

image.png

So the data I was working with has been a bit challenging. Given that this is my second week working in SQL, I felt really good that I was able to make a join on my own! I had a bit of help from a colleague of mine but once she showed me what to do for some of it, I was able to get one set up! I was really excited to get that rolling.

I wasn't sure the process of doing multiple left outer joins and I'm still not entirely clear on what the function does but I am learning it.

The way I am figuring it out is that if I am trying to query data from one table and that table doesn't have all of the info on it that I want, I can add columns from other tables to it. When I do that with a left outer join, it's taking the original table and adding chunks of the other table into it. This has been a huge help because as people who use SQL know, at least in my experience, all my information isn't in one table! I'm having to link 3 and 4 different tables to get the data I want. A bit tedious but exciting, at least for me, at the same time!

Ambiguity

So in writing this post I also stumbled on another piece of information that will prove very helpful for me in understanding some of the errors I encounter!

I would often get an error when I was doing my left outer joins that something wasn't ambiguous. I was like what the hell does that mean? I deleted the line because that's what it seemed to want me to do.

Hive SQL

My plans for doing this type of work is so that I can how to use SQL to query the Hive database and pull data from it. I want to be able to get information I am curious about exploring further so that I can build some visualizations. It may be a pipe dream for this year but I am sharpening my skills in these areas every week so it's been a fun ride!

Hive Divider Bar Centered.png

Connect with me!

Do you want to get paid, in crypto, for searching the internet? Try using and signing up for Presearch to earn some great crypto! I've currently got 1,629 PRE tokens, with a market value of $27.97. It doesn't sound like a lot but when you search using sites like Google you get paid $0! Join Presearch to break Google's stranglehold on the internet searches. If you'd like to sign up, use my referral link below and spread the word!
https://www.presearch.org/signup?rid=513043



0
0
0.000
11 comments
avatar

Loving the educational Blogs.

0
0
0.000
avatar

Thanks my friend! That’s one of my core components lol appreciate the support!

0
0
0.000
avatar

Nice!
I just connected Node.js to MySQL on my computer locally just now.
Let's get this ball rollin!

0
0
0.000
avatar
(Edited)

Hell yeah man that’s awesome! Do you have to pay for MySQL? I know there is software you have to pay for versus ones you don’t.

I don’t want to connect my companies SQL software to hive lol it’s Citrix based so it’s all tracked. Thankfully my tableau is locally installed so I can mess around with hive data visualizations for fun.

I’m looking forward to playing with hive data in SQL, going to be a lot easier to fuss out information I want to show!

0
0
0.000
avatar
(Edited)

Nah MySQL is totally free and open-source. Only thing I'd have to pay for is server hosting if I want the world to be able to connect to my database. However, my goal is to create something that everyone can run locally on their own machine, so I can probably avoid high server costs.

Only paid databases I know of are Oracle and Microsoft, and you only have to pay for those if you are doing some crazy high-end stuff. The only reason to pay for a database is if you need to scale up massively and have huge volume and throughput. In other words... a big centralized service. Clearly this is something we should be trying to avoid if possible.

0
0
0.000
avatar

Yeah true lol I do have the ability at work to broadcast my tables to enterprise things but I’m too noob to do that. We use Microsoft but it’s big company so it’s not shocking. Plans are to eventually join the data analytics team at some point.

Thanks for the MySQL name though! I’ll have to get a download of it so I can use it on my own for fun.

!ENGAGE 35

0
0
0.000
avatar

I think the 2 most popular open-source free ones are MySQL and postgreSQL.
I use a frontend app called MySQL Workbench that works really nicely to tinker with the database.

0
0
0.000
avatar

Thank you for your engagement on this post, you have recieved ENGAGE tokens.

0
0
0.000
avatar

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider supporting our funding proposal, approving our witness (@stem.witness) or delegating to the @stemsocial account (for some ROI).

Please consider using the STEMsocial app app and including @stemsocial as a beneficiary to get a stronger support. 
 

0
0
0.000
avatar

Thank you I appreciate the support! I’ll be posting some more stuff in here soon!

0
0
0.000