Комментарии:
Hi All, I am the beginner in the IT field. I used the same comments but i am not getting the answer properly. could you please help me.
select case when translation is null
then comment
else translation
end as output
from comments_and_translation;
I am using MY SQL Work Bench for learning purpose.
Thanks a ton a detailed explanation
ОтветитьAwesome Man!
ОтветитьThanks TFQ the last question was everything, I was blocked on how to remove mirror effect records from my query.
ОтветитьHi ,
Can you please suggest any to learn from? I have started learning SQL.
Thanks!
Wonderful expiations, especially the last question has a newer nuance..
Ответитьthanks teacher, im learning alot your a great teacher
ОтветитьSlow down little bit,Why you are running with your speech ?
ОтветитьFor the 3rd question, we can simply use cartesian join too..for playing twice
Ответитьthird one can solve by using simple self join
for 2 match with each team --
select t1.team_code team1 , t2.team_code team2 from teams t1 ,
teams t2
where t1.team_code <> t2.team_code ;
for one match with each team --
select t1.team_code team1 , t2.team_code team2 from teams t1 ,
teams t2
where t1.team_code > t2.team_code ;
query 2: without joins
select id , case when id = 3 then 'new in source' else 'mismatch' end as output from source where id in(3,4)
union
select id ,'new in target' as output from target where id in (5) OR
select id , decode (id ,3,'new in source',4,'mismatch') as output from source where id in(3,4)
union
select id ,'new in target' as output from target where id in (5);
Brilliant !!!
ОтветитьThis video was really interesting. Your explanations are great! Thank you
ОтветитьHi
In my results
Out put is like
3,4,5
But ur output 3,5,4
I'M using ssms server or other things
hi bro,
can you please help me to get resolve this task.
Sales table:
------------+------------+-------------+
| sale_date | fruit | sold_num |
+------------+------------+-------------+
| 2020-05-01 | apples | 10 |
| 2020-05-01 | oranges | 8 |
| 2020-05-02 | apples | 15 |
| 2020-05-02 | oranges | 15 |
| 2020-05-03 | apples | 20 |
| 2020-05-03 | oranges | 0 |
| 2020-05-04 | apples | 15 |
| 2020-05-04 | oranges | 16 |
+------------+------------+-------------+
Write an SQL query to report the difference between number of apples and oranges sold each day.
sir i have already emailed you regarding my query please try to respond as soon as possible, Thankyou
ОтветитьPlease solve questions on sub query and pivot
ОтветитьThanks!
ОтветитьNice question and answers
However the third question can be solved without rownumber()
as the < can be directly applied on team code