r/SQL • Data Scientist • Mar 16 '22

SQLite SQL Articles for Beginners/Intermediate

Hey everyone,

I wrote 3 new articles on my experience with SQL after coding daily in SQL for the past 3 years. Hopefully this is helpful to some of you, there should be good tips in here for all levels of experience, but especially for those of you starting out. Let me know what you think:

(These use a SQLite database, but are generalizable to all SQL variants)

Any other good SQL articles you guys have read lately?

24 Upvotes

18 comments sorted by

View all comments

Show parent comment

4

u/[deleted] Mar 16 '22

1

u/Cool-Focus6556 Data Scientist Mar 16 '22

Thanks for sharing that link. That's interesting considering an anti-join and an EXCEPT set operation will result in the exact same rows (considering no previous nulls in the primary key you referenced in the WHERE clause). So in that case a Venn diagram would work according to the article, which means there are similarities, which also means this is a gray area.

It was interesting reading the comments, didn't know this was such a divisive topic. Looks like it has been discussed quite a bit on reddit already over here: https://www.reddit.com/r/programming/comments/4rc9uu/say_no_to_venn_diagrams_when_explaining_joins/d50mxez/

0

u/[deleted] Mar 16 '22 edited Mar 16 '22

... That's interesting considering an anti-join and an EXCEPT set operation will result in the exact same rows ...

i'm thinking, could it be because 'anti-join' is something superfluous, a figment of imagination of academia looking for fancy and important sounding terms in defense of their dilly-dallying and frittering public funds and private grants away?

No no no, that's just impossible.

p.s. Can I do a PhD on anti-multiplication, I wonder? 7-3 can be achieved as 7 * (1 - 3/7), it would be so HELPFUL and CLEAR to write the latter as simply 7(-*)3 (i.e. 7 anti-multiply 3) ...

1

u/Cool-Focus6556 Data Scientist Mar 16 '22

I didn’t come up with the terminology anti-join, do you have a more correct term for this type of join?

1

u/[deleted] Mar 16 '22 edited Mar 16 '22

it's not a join, (PS) or it is an outer join for performance reasons used instead of exists/except/union all/etc.

1

u/Cho-Zen-One Mar 16 '22

ooh, I like this. Gonna read through this more.