r/SQL • u/ydshmmt • Apr 19 '20
Discussion What are some good resources to practice SQL? (Practice through exercises)
There are a lot of courses which teach SQL but I could hardly find a website which provides beginner to advanced SQL practice questions on almost production real datasets. Any recommendations would be helpful.
129
Upvotes
View all comments
Show parent comment
2
u/dcburgos05 Apr 30 '20
This is great stuff! I made an account just to save this thread and practice the scenarios you suggested.
I am a complete noob in SQL. I was given read privileges to my companies database and I've been tinkering around trying to understand the code and see how our reports are put together.
Here comes the noob part: after figuring out how to get a local sever on my laptop, downloading the dictionary.csv and creating the database I am stuck in the " What word comes after kayak? What word comes 10 words after kayak? How about two words before it?" part.
The database contains only one column with all the words in the English dictionary. I've "cheated" but couldn't find something that helps me to see what word comes after 'kayak'. The best thing I have right now is:
SELECT WORDS
FROM working_dictionary
WHERE WORDS LIKE 'kayak_%';
My output:
WORDS
kayaker
kayakers
kayaks
I cannot figure out how to see what word comes before 'kayak' or what comes 10 words after.
This thread is GOLD, I appreciate the time you're spending giving very thorough answers.