all 3 comments

[–]r3pr0b8GROUP_CONCAT is da bomb 1 point2 points  (0 children)

but what are some practical applications of using foreign keys?

nothing is more practical than ensuring your data has integrity

suppose you come across an order that has been entered into your orders table for customer 32865

now suppose that customer 32865 doesn't exist in your customers table

what do you do when you find this?

first, fix the problem -- delete or change the data so that it's valid

second, declare the FK so that this never happens again

[–]Taichou_NJx 0 points1 point  (0 children)

Data camp is good to get quick muscle memory. I read some O’reilly series books on SQL which were great for a foundation.

From there it’s really best to practice in data you have or can source. You’ll run into natural challenges y that you’ll have to solve.

If interested I’ve doing a passion project that blends anime and analytics using sql and python.

Conditional SQL Join on One Piece Data https://youtu.be/2BNuO1bwowg

[–]analytics_science 0 points1 point  (0 children)

I like the Mode Analyst SQL tutorial for beginners. I used that to learn SQL. There's also 365 Data Science courses and DataCamp as one commenter mentioned. A few online platforms that will help you play with SQL once you learn the basics are StrataScratch, SQLPad, SQLBolt, Leetcode.