Forum Discussion
JonGunnar
4 years agoFrequent Visitor
New columns like subquery
Hi, I simply need to achieve as shown in picture. In sql I would simply write
select
c.customer
,(select e.product_id from product e where e.product_id = c.product_id and e.productgroup = 'Elcert') as Elcert
,(select g.product_id from product g where g.product_id = c.product_id and g.productgroup = 'Grid') as Grid
,(select p.product_id from product p where p.product_id = c.product_id and p.productgroup = 'Power') as Power
from customer c
sandee
You can merge these two tables as a new query and get the desired results.
I have attached the file