Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

new demo

Language: Layout:
View schema
Execution time: 0,02 sec, rows selected: 7, rows affected: 6, absolute service time: 0,17 sec 
edit mode |  history
   (No column name) (No column name)
1 [A],[B],[C],[D],[E] Select * from ( select *, copy=Id_product from t ) t pivot (count(copy) for ID_product in ( [A],[B],[C],[D],[E] ))p
   ID_patient A B C D E
1 111 0 0 1 0 0
2 123 1 1 0 0 0
3 222 1 0 0 0 0
4 333 0 0 0 1 1

    
                
λ
.NET NoSQL database for rapid development