-1

I have three tables containing three types of information about a product. The tables are:

Table_Parent_Group:

enter image description here

Table_Sub_Group

enter image description here

Table_Productentry

enter image description here

I need to run a query that will select all product from Table_Productentry where ParId = 1

Kallol Das
  • 141
  • 4
  • 18

2 Answers2

0
select table_productentry.product_name
from table_productentry
join table_sub_group
join table_parent_group
on table_sub_group.grid=table_productentry.grid and
on table_sub_group.parId=table_paren_group.parId
where table_parent_group.parid=1

i hop this work for you

hasnain
  • 133
  • 1
  • 10
0

here is your query

SELECT tpro.* FROM Table_Productentry tpro 
LEFT JOIN Table_Sub_Group t_sub ON tpro.GrId=t_sub.GrId
LEFT JOIN Table_Parent_Group t_par ON t_par.ParId=t_sub.ParId
WHERE t_par.ParId = 1
GYaN
  • 2,327
  • 4
  • 19
  • 39