+ 1
I need sql statment to do( select one comlmn if another is have defrent value)
sql
8 Antworten
+ 2
Unfortunately there is no sql play ground so I cannot test my statement.
What you are looking for is the opposite of distinct
which is
group by having count > 1
Select name, status from table1 group by name having count > 1
+ 1
Please explain the question a bit more. I think it is a good question but I do not understand the question with the information you gave.
Can you show use a example ?
+ 1
Thank you for your explanation.
I do understand your question better now.
Unfortunately I still do not understand everything
What is the result you expect based on the columns you have given ?
+ 1
Thank you now I understand.
The question is clear to me, let me think about the statement.
0
thanks for you
i have two column:
name status
______ _______
mh active
mh busy
go active
has active
has offline
has busy
yas busy
I wana select name and status if is name have a many and defrent status
I hope my ex is is good
thanks
0
I need below result:
name status
______ ______
mh active
mh busy
has active
has offline
has busy
0
many thanks for you
0
thanks
I will try and back