Hi ...when you do not add A.product_name < B.product_name condition , you will get below combination of product1 and product2 as shown below. apple apple banana apple soya milk apple apple banana banana banana soya milk banana instant oatmeal instant oatmeal soya milk instant oatmeal apple soya milk banana soya milk instant oatmeal soya milk soya milk soya milk 1. From the above combination, we do not require below combination : (apple apple) , (banana banana) , (instant oatmeal instant oatmeal) , ( soya milk soya milk) as it does not make any sense 2. From the below combination, we require only one combination as it means the same : (banana apple) and (apple banana) (banana soya milk) and (soya milk milk ) (instant oatmeal soya milk) and (soya milk instant oatmeal) etc.. In order to remove both above combinations, we will have to use A.product_name < B.product_name . What this query will do ? ProductName being string datatype, it will compare the ASCII value of first character of both the product. In case ASCII value of first character is same , it will check and compare second character and so on. In case of (apple apple ) combination, ASCII value will always be same ...so this combination will be ruled out as ( A.product_name < B.product_name ) In case of (banana apple) and (apple banana) , only one pair will be satisfied other will be ruled out. This way we will be able to reject unwanted combinations of product1 and product2. I hope I am able to explain you. If you still find any doubts, u can comment. I will try to make you understand. Please like my video and subscribe my channel if you have not done so. This will help my channel to grow.
I've liked your explanation. Thanks
Thank you so much for liking my video.
nice explanation
I am glad you found it helpful! Thank you !
Hi Sir,
I didnt get the line A.product_name < B.product_name
can you explain the thought process
this will clear my doubt
Thanks for the Video!
I too have this doubt.. please clarify
Same question from my side bcoz product name is not a numerical value so how can we use less than operator here
Hi ...when you do not add A.product_name < B.product_name condition , you will get below combination of product1 and product2 as shown below.
apple apple
banana apple
soya milk apple
apple banana
banana banana
soya milk banana
instant oatmeal instant oatmeal
soya milk instant oatmeal
apple soya milk
banana soya milk
instant oatmeal soya milk
soya milk soya milk
1.
From the above combination, we do not require below combination :
(apple apple) , (banana banana) , (instant oatmeal instant oatmeal) , ( soya milk soya milk) as it does not make any sense
2.
From the below combination, we require only one combination as it means the same :
(banana apple) and (apple banana)
(banana soya milk) and (soya milk milk )
(instant oatmeal soya milk) and (soya milk instant oatmeal)
etc..
In order to remove both above combinations, we will have to use A.product_name < B.product_name .
What this query will do ?
ProductName being string datatype, it will compare the ASCII value of first character of both the product. In case ASCII value of first character is same , it will check and compare second character and so on.
In case of (apple apple ) combination, ASCII value will always be same ...so this combination will be ruled out as ( A.product_name < B.product_name )
In case of
(banana apple) and (apple banana) , only one pair will be satisfied other will be ruled out.
This way we will be able to reject unwanted combinations of product1 and product2.
I hope I am able to explain you. If you still find any doubts, u can comment. I will try to make you understand.
Please like my video and subscribe my channel if you have not done so. This will help my channel to grow.
@@ItJunction4all great explanation. Thanks bro
@@ItJunction4all Thank you Sir ♥️💯🙏
"when you first open up soft soft..."