Hi,
I am guessing this is something simple to you guys however I am new to sql and am unsure how to create this query (I must do it in SQL).
I am wanting to show in one query which supplier sells all species of plants. So for instance I want the query to display the results like so:
Supplier Species
PlantCO Plant, Tree, flower
(not neccessarily in a row, could be every species in separate row).
I tried a count to count the number of suppliers which sell all species, however, it didn't work out too good:
SELECT DISTINCT LEVERANC.LEV_NA AM, Count(PLANTEN.P LANTNAAM) AS PLANTNAAM
FROM PLANTEN INNER JOIN (LEVERANC INNER JOIN OFFERTES ON LEVERANC.LEV_CO DE = OFFERTES.LEV_CO DE) ON PLANTEN.ART_COD E = OFFERTES.ART_CO
GROUP BY LEVERANC.LEV_NA AM;
(sorry it is Dutch data, plantnaam being the plant and leveranc being the supplier).
I hope this is enough information and if anybody can provide me with advice or a solution I would appreciate it a lot. Thankyou :)
I am guessing this is something simple to you guys however I am new to sql and am unsure how to create this query (I must do it in SQL).
I am wanting to show in one query which supplier sells all species of plants. So for instance I want the query to display the results like so:
Supplier Species
PlantCO Plant, Tree, flower
(not neccessarily in a row, could be every species in separate row).
I tried a count to count the number of suppliers which sell all species, however, it didn't work out too good:
SELECT DISTINCT LEVERANC.LEV_NA AM, Count(PLANTEN.P LANTNAAM) AS PLANTNAAM
FROM PLANTEN INNER JOIN (LEVERANC INNER JOIN OFFERTES ON LEVERANC.LEV_CO DE = OFFERTES.LEV_CO DE) ON PLANTEN.ART_COD E = OFFERTES.ART_CO
GROUP BY LEVERANC.LEV_NA AM;
(sorry it is Dutch data, plantnaam being the plant and leveranc being the supplier).
I hope this is enough information and if anybody can provide me with advice or a solution I would appreciate it a lot. Thankyou :)

Comment