I have
order_id status tr_number
123 null 99991
123 null 99992
123 V 99993
128 null 99994
128 V 99995
130 null 99996
130 null 99997
And I need to select orders which have at least one status "V" , and how many such orders:
Let say:
tr_number order_id count(with null) count(with 'V')
99993 123 2 1
99995 128 1 1
Thanks.
order_id status tr_number
123 null 99991
123 null 99992
123 V 99993
128 null 99994
128 V 99995
130 null 99996
130 null 99997
And I need to select orders which have at least one status "V" , and how many such orders:
Let say:
tr_number order_id count(with null) count(with 'V')
99993 123 2 1
99995 128 1 1
Thanks.