r/learnSQL • u/Successful_Cry_4972 • Mar 14 '26
How do i start SQL?
I m not from IT background..tried looking some youtube tutorials, everything goes up from my head..
I tried SQL basic exercise but damn, what the hell is this.. Select * From column??? Huh?? What to select..why to select? Plz give me some advice !
22
Upvotes
View all comments
Show parent comment
5
u/cspinelive Mar 14 '26
Now add another sheet to your excel file. Call it authors. It has info specific to the person who wrote a book.
Author id, First name, last name, year born, hometown, etc.
We don’t put all that in the books table because it would repeat over and over again if the author wrote 20 books. The only thing that goes in the book table is the author id. Since both tables have author id the database can make the connection and know they are linked.
That lets us get the author name at the same time we get our books
Select b.title, a.first_name
from books b join author a on (b.author_id = a.author_id)
Where a.year_born > 1999