sql server 2012 - SQL query to retrieve the matching data over secondary tables link to master tables -


i have sql server database 4 tables.

1st table contains list of names primary key:

id1    name ---------------      1     abc  2     xyz 

2nd table having foreign key 1st table related properties.

id2   properties   id1 -----------------------  1      p1          1  2      p2          1  3      p3          1  4      p2          2  5      p3          2  6      p5          2 

3rd table contains tasks:

id3    task -----------  1     t1  2     t2 

4th table task properties related task table foreign key:

id4   properties   id3 -----------------------  1    p1            1  2    p2            1  3    p3            1  4    p2            2  5    p3            2  6    p5            2 

scenario in case have task , have match properties 1st table name's properties.

e.g. on task 2, properties matched xyz.

i trying group , having count no luck accurate result.

is can please me out it?


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -