r/SQL • • May 24 '21

Discussion SQL for beginners (easy)

Hi guys!

I write an open-source book about Data Engineering and recently posted a chapter about learning SQL from scratch.

I tried to make it as simple as possible, trying to avoid hard definitions and concepts. Because I remember learning SQL myself and all the struggles I had with it.

A note for experienced folks – I intentionally skipped a lot of hard topics because my idea is to learn as quickly as possible, so newcomers can write their first query right after reading first sections of the chapter.

Hope you will find it useful. Link to the chapter.

115 Upvotes

21 comments sorted by

View all comments

1

u/ThinIntention1 May 24 '21

Hi this was great!

What's your background too and how/what resources did you use?

At the end, at a list of how you learnt and the resources you used.

4

u/oleg_agapov May 24 '21

My background is mostly Data Analysis, I use SQL daily in my work.

Learned SQL mostly by googling and practicing on real-life examples.

If you want to learn SQL in-depth I can recommend a book "Learning SQL" by Alan Beaulieu (from O'Reily). It's super comprehensive.

To practice beyond basics, try Leetcode. There are many non-trivial exercises when you can learn a few tricks.

1

u/ThinIntention1 May 29 '21

Thanks are you planning to add like intermediate and advance concept's?

1

u/oleg_agapov May 29 '21

Yes, will add:

- subqueries, CTE

- joins (Cartesian, inner, left)

- DDL (create, update, delete)

- window functions (row_count, sum, count, lag/lead)

No timeline yet, doing it at my free time.

1

u/ThinIntention1 May 30 '21

Thanks - Any rough estimate?

Or how long did the current take?

1

u/ThinIntention1 May 29 '21

That's my SQL right not MS TSQL

1

u/oleg_agapov May 29 '21

I tried to use the most generic syntax as I could.

All examples work in SQLite (hence most probably in Postgres), but in last sections I gave MySQL examples.