Answer the question
In order to leave comments, you need to log in
MS SQL select is it possible to create such a query?
There is a database on MS SQL Server:
Microphone Platform Quantity
Sm58 Pivka 0
Sm91 Pivka 1
Akg414 Pivka 1
E904 Pivka 5
Sm58 Intercon 0
Sm91 Intercon 1
Akg414 Intercon 1
E904 Intercon 1
Microphone Pivka Intercon
Sm58 0 0
Sm91 1 1
Akg414 1 1
E904 5 1
Answer the question
In order to leave comments, you need to log in
select Microphone
,sum(case Platform when 'Pivka' then Quantity else 0 end)
,sum(case Platform when 'Intercon' then Quantity else 0 end)
from MyTable
group by Microphone
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question