Writing CASE WHEN Statements in SQL (IF/THEN)

  Рет қаралды 86,181

Becoming a Data Scientist

Becoming a Data Scientist

Күн бұрын

Step-by-step tutorial shows you how to use the CASE WHEN statement in SQL to execute IF/THEN statements that customize your output!
Get the Northwind Database: • How to Load a Sample P...
Support the Channel:
1) Subscribe: www.becomingads.com/o/youtube
2) DataCamp:
3) Udacity:

Пікірлер: 79
@sarahemslie6105
@sarahemslie6105 4 жыл бұрын
An afternoon binge-watching your SQL videos is time well spent! Thank you for taking the time to make them. Subscribed.
@becomingADS
@becomingADS 4 жыл бұрын
That's awesome Sarah!! So happy to have helped ya out!
@ukaszk.8305
@ukaszk.8305 3 жыл бұрын
I'm using your videos as quick (yet pretty comprehensive!) introductions to the topics you cover. For that, you go at a perfect pace and level of detail for me. And you are always to the point, with no excessive intros. Simplicity is great! The overall quality is also pretty good. Thanks a lot for all your work and enthusiasm. Please keep going! :)
@griffinwillig4329
@griffinwillig4329 Жыл бұрын
Dude, you are legit the best. I have watched so many Coursera's and taken so many classes, and you by-far explain everything THE BEST. Keep on rocking.
@ANUJYADAV-dj1iq
@ANUJYADAV-dj1iq 4 жыл бұрын
i have gone through many videos on youtube but I find my solution here at the end. thanks for making this video.
@MichaelFlenderson
@MichaelFlenderson 3 жыл бұрын
Thank you! You’re a good teacher 🙏🏻
@anne7983
@anne7983 Жыл бұрын
Just the tutorial I need. Thank you so much!🤩
@showutheworld
@showutheworld 4 жыл бұрын
Your videos are awesome!!! I'm currently taking a course and your second explanation is exactly what I need to understand the concepts better! Thank you! Please continue :) Already subscribed.
@nextdoortechieaminfirnash6002
@nextdoortechieaminfirnash6002 2 жыл бұрын
It was right to the point. Thank you for a wonderful lesson.
@krystianeotis6479
@krystianeotis6479 3 жыл бұрын
Your videos have been so helpful. Thank you!!!
@serenereader
@serenereader Жыл бұрын
You are an excellent teacher. Thank you!
@stevencarv-buc3163
@stevencarv-buc3163 3 жыл бұрын
*Y repentinamente un comentario en español* xD Es justo lo que estaba buscando, te agradezco. Este canal es extremadamente útil. ¡un saludo Nathan!
@vaidehishah8867
@vaidehishah8867 8 ай бұрын
These videos were really helpful! Thanks a ton!
@andrewkorneychuk586
@andrewkorneychuk586 3 жыл бұрын
Just want to say thank u for this great mysql tutorials
@deadbrain1861
@deadbrain1861 3 жыл бұрын
Thank u I watched all sql playlist u r the best
@mazinmohammed6624
@mazinmohammed6624 3 жыл бұрын
please continue with the database videos, if you could do some on T-SQL and SSM it'd be great!
@dawitworku821
@dawitworku821 3 ай бұрын
It's very helpful! Thank you.
@valentinacoy7757
@valentinacoy7757 3 жыл бұрын
Your videos are amazing, thank you so much!!!
@mishraadityaanandeavmjejdt265
@mishraadityaanandeavmjejdt265 3 жыл бұрын
Thank you so much for such a great content . It really helped me a lot.
@embisonjones4996
@embisonjones4996 Жыл бұрын
That you Nathan. You’ve earned a new subscriber
@12245Fred
@12245Fred 4 жыл бұрын
Amazing explanation, thank you this helped a lot
@user-ft7bi6qc8i
@user-ft7bi6qc8i 8 ай бұрын
Thank you so much for the help
@jordanroywhite
@jordanroywhite 3 жыл бұрын
Thanks so much for the great video!
@higiniofuentes2551
@higiniofuentes2551 2 жыл бұрын
Thank you for this very useful video!
@butchdavis2062
@butchdavis2062 3 жыл бұрын
Subscribed big time, thank you brother
@max1qin927
@max1qin927 3 жыл бұрын
Hi Nathan, your videos are amazing. I watched all about sql and helped me a lot. I find you stop uploading new videos. Could you please do your video again. I am sure they help a lot of people on the planet of Earth.
@anthonynorman1212
@anthonynorman1212 2 жыл бұрын
Your Video was perfect! Thank You
@MartinFaehrmann
@MartinFaehrmann 3 жыл бұрын
Very helpful video, thank you :)
@ravinderthakur7973
@ravinderthakur7973 2 жыл бұрын
Thx a lot, it helps me a lot
@ashokandhra2268
@ashokandhra2268 2 ай бұрын
Thank you... It's helpful
@96aditishah
@96aditishah 2 жыл бұрын
Great explanation! Thanks
@alexg97343
@alexg97343 2 жыл бұрын
Great explanation
@timothyhallbeck9853
@timothyhallbeck9853 2 жыл бұрын
Good intro into Case, thanks.
@darylfgeorge
@darylfgeorge 3 жыл бұрын
great video, thank you!
@itzyfan88
@itzyfan88 10 ай бұрын
Very clear, thanks
@pv6010
@pv6010 11 ай бұрын
u r the man, thankxxxxxxx
@gonzalomartinez1575
@gonzalomartinez1575 3 ай бұрын
Thanks very useful
@Hannah-iv6rm
@Hannah-iv6rm 16 күн бұрын
this is more helpful than my teacher's exp
@attrinh8343
@attrinh8343 7 ай бұрын
verry good content
@LucHayman
@LucHayman 3 жыл бұрын
Awesome thank you! Is it possible to add multiple case statements in one query? How would I do that?
@wiktor18071
@wiktor18071 4 жыл бұрын
Supporting the excellent wrk:)
@becomingADS
@becomingADS 4 жыл бұрын
You're the best!
@languagesandotherstuffs3305
@languagesandotherstuffs3305 2 күн бұрын
Thank you
@manavsaxena5579
@manavsaxena5579 3 жыл бұрын
Hey man, awesome tutorials. Is there anything coming on Window Functions?
@sailoben
@sailoben 2 жыл бұрын
I have been engaged to Udemy couse on MS SQL server, but some explainations are hard to understand. Whenever I have doubt This is where I go to. Keep making videos please. Thanks
@adityadalvi7884
@adityadalvi7884 7 ай бұрын
Thanks
@thewaifupillow
@thewaifupillow 3 жыл бұрын
Awesine series, can you do one on correlated subqueries?
@KevinTempelx
@KevinTempelx 3 жыл бұрын
Thanks!
@xesiusprime9360
@xesiusprime9360 3 жыл бұрын
right on man thanks very helpful and informative supplementation of my education when i dont understand them in how they describe it btw im wondering, I am almost done my SQL and i heard that i could find a foot in the door kind of job with just SQL. Is this true? how do i find it?
@user-cz7tk3gh6w
@user-cz7tk3gh6w 3 жыл бұрын
good job
@prasadkhairnar7915
@prasadkhairnar7915 2 жыл бұрын
thanks : )
@yotsusan_machi
@yotsusan_machi Жыл бұрын
thank kyu mr
@factorise001
@factorise001 2 жыл бұрын
waiting for new videos!!
@ViciousZeroEnder
@ViciousZeroEnder 3 жыл бұрын
DO MORE SQL VIDEOS PLEASE!!!!
@andyn6053
@andyn6053 3 жыл бұрын
more sql videos pls :)
@kanknw
@kanknw 3 жыл бұрын
Can you make video about solving complex sql problem
@abdulsami5843
@abdulsami5843 3 жыл бұрын
good tutorial, I am a bit confused about the sum(frieght) shouldn't the sum be increasing as we go down ?
@karlderkastn7012
@karlderkastn7012 3 жыл бұрын
tomorrow is my final exam, thanks :)
@charmalvarez9717
@charmalvarez9717 Жыл бұрын
thank you so much, did you stop posting videos?
@montieeaster9883
@montieeaster9883 4 жыл бұрын
Can the Then output be another column rather than a text?
@christleiroezi8878
@christleiroezi8878 3 жыл бұрын
Hello, I have a huge Case statement query that groups a column into buckets, I am trying to count how many patients are in each bucket, How do I do that?The case statement does let me use the count function. Thanks
@kellensampson289
@kellensampson289 3 жыл бұрын
Question: is it possible to then sort out your results so that all the customers within the same weight range are listed together? For example, all the "heavy" customers are ordered first, then all the "medium" customers, then all the "light" customers? All within the same output?
@ViciousZeroEnder
@ViciousZeroEnder 3 жыл бұрын
if you do order by freight it would effectively do what ur askin
@MohamedIbrahim-pg1rw
@MohamedIbrahim-pg1rw 5 күн бұрын
Group By 1 can u pls explain this
@danielmejia8530
@danielmejia8530 3 жыл бұрын
Very Nice. Can I use logic after WHEN? let's say: WHEN (condition_A AND condition_B) THEN something.
@vigneshiyer2424
@vigneshiyer2424 3 жыл бұрын
Yes, you can.
@simondreyfuss754
@simondreyfuss754 2 жыл бұрын
Jurassic Park: We're gonna make a fortune with this script....
@BessieMartin-cl8sz
@BessieMartin-cl8sz 9 ай бұрын
interest!
@BRAloni
@BRAloni Жыл бұрын
how to Write a query to display EMPLOYEES having ID 101,102,103 as per the below order: 1. 101, 2. 103, 3. 102 (Hint: Union Operator / Case Statement) QUERY
@Leopar525
@Leopar525 Жыл бұрын
I love your content but you should zoom in a bit.. too much empty space and we cannot see the letters without high definition when on mobile
@Leopar525
@Leopar525 Жыл бұрын
I love your content but you should zoom in a bit.. too much empty space and we cannot see the letters without high definition when on movile
@praji1202
@praji1202 2 жыл бұрын
Where is the if condition?
@Helloimtheshiieet
@Helloimtheshiieet Жыл бұрын
Ok... but not if you do case when XYZ AND ABC then 1 else 0...
@Yarunooo
@Yarunooo 2 жыл бұрын
SELECT UnitsOnOrder, CASE WHEN UnitsOnOrder > UnitsInStock THEN 'a' else 'test' End as BestellingenStock FROM Orders; 01:46:40 SELECT UnitsOnOrder, CASE WHEN UnitsOnOrder > UnitsInStock THEN 'a' else 'test' End as BestellingenStock FROM Orders LIMIT 0, 2000 Error Code: 1054. Unknown column 'UnitsOnOrder' in 'field list' 0.016 sec
@mujtaba135
@mujtaba135 3 жыл бұрын
Need Help !!!!!!!!!!!
@harshavardhank9915
@harshavardhank9915 3 жыл бұрын
please use single quotes otherwise it won't work
3 жыл бұрын
Thanks
@Leopar525
@Leopar525 Жыл бұрын
I love your content but you should zoom in a bit.. too much empty space and we cannot see the letters without high definition when on mobile
How to do Subqueries in SQL with Examples
8:20
Becoming a Data Scientist
Рет қаралды 166 М.
Conditional Statements in R (If, Else If, and Else)
12:02
Becoming a Data Scientist
Рет қаралды 16 М.
Schoolboy - Часть 2
00:12
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 10 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 10 МЛН
Jumping off balcony pulls her tooth! 🫣🦷
01:00
Justin Flom
Рет қаралды 29 МЛН
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 133 М.
Combine SQL Queries With UNION, INTERSECT, EXCEPT
5:04
Becoming a Data Scientist
Рет қаралды 47 М.
SQL Tutorial - Nesting CASE statements
8:46
BeardedDev
Рет қаралды 19 М.
How to Respond to Different Situations in English
10:48
Learn English with Bob the Canadian
Рет қаралды 26 М.
Advanced Aggregate Functions in SQL (GROUP BY, HAVING vs. WHERE)
6:00
Becoming a Data Scientist
Рет қаралды 241 М.
SQL WITH Statements (Common Table Expressions - CTE)
5:40
Becoming a Data Scientist
Рет қаралды 95 М.
Nested Queries | SQL | Tutorial 18
10:23
Giraffe Academy
Рет қаралды 176 М.
Это iPhone 16
0:52
Wylsacom
Рет қаралды 1,4 МЛН
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 6 МЛН
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18