That was really good, didn't know you could do this with CASE statements
@newbieuserguy6899
2 жыл бұрын
It would help students / neophytes if the 3 discounts were unique values. By using 10%, 10%, and 5%, there's an opportunity to misunderstand which of the two "10%" occurrences is being applied. I suggest using 13%, 10%, and 5%.
@BeardedDevData
2 жыл бұрын
That's a fair point.
@vikkichang232
Жыл бұрын
Finally... something that was helpful THANK YOU!
@gilenomascarenhas6693
3 жыл бұрын
Okay, that was brilliant, didactic and rare. And that goes for both the example and the performance. Thank you, sir!
@BeardedDevData
3 жыл бұрын
Thanks so much for the positive feedback.
@chandrarama1970
4 жыл бұрын
You are back !! :) Your videos helped me a lot in my college assignments. especially the window function series.
@BeardedDevData
4 жыл бұрын
Thanks so much, if there is anything you would like to see a tutorial on please let me know.
@chandrarama1970
4 жыл бұрын
@@BeardedDevData Sure!!!!!!!
@desidancequeen
4 жыл бұрын
@@BeardedDevData Hi, I loved your window function series too. I would like to see how we could solve questions like 'Earliest order id for each other, each day of the month' How do you dig through different dimensions'?
@superfreiheit1
Жыл бұрын
LIke is expensive, you could also use the Color column.
@subhanmehdizade2852
2 жыл бұрын
Thanks, sir. Many many thanks! wish u best.
@padhisambit
3 жыл бұрын
Really nice information...helps a lot !!
@TomerBenDavid
4 жыл бұрын
Great video and great speaker!
@modhua4497
3 жыл бұрын
Excellent example
@hamiali
3 жыл бұрын
Awesome..Great speaker..!!!
@fulvioalario6986
3 жыл бұрын
Great video. Thanks. Just a question. Could I use the AND operator instead of + ?
@BeardedDevData
3 жыл бұрын
Not in this case as we actually want to perform addition.
@MNSHARIF623466
3 жыл бұрын
helpful
@pson3672
4 жыл бұрын
Thanks for your tutorial. My doubt is can we add one more columns to group all the discounts together. For example: when the discount is 10% it should be an "Avg discount" mentioned in another column, when discount is 25% it should be "Max discount".
@BeardedDevData
4 жыл бұрын
If my understanding of your question is correct then you mean instead of CASE WHEN Cat.EnglishProductCategoryName = 'Bikes' THEN 0.10 END we have CASE WHEN Cat.EnglishProductCategoryName = 'Bikes' THEN AverageDiscount END (providing AverageDiscount is a column) then yes we don't have to use literal values within CASE statements, can refer to other columns
@bamii_a
4 жыл бұрын
love the videos mate, where can I download the db ?
@BeardedDevData
4 жыл бұрын
Thanks so much, you can download the .bak files for Adventure Works from here, docs.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver15&tabs=tsql, I used AdventureWorksDW2016 in the vido
@JD_018
3 жыл бұрын
Great Video. I was wondering, can I use similar case statements to return a text value and not carry out any addition operations? Thanks
@BeardedDevData
3 жыл бұрын
Sure, for example CASE WHEN Quantity < 10 THEN 'Small' WHEN QUANTITY < 30 THEN 'Medium' ELSE 'Large' END AS OrderSize
Пікірлер: 25