How To Query Top Three Reference ID only and How I can query until 3 Level Group below only Based Reference ID
问题 I have table like this below where it save all data with reference id :- ID Name RefID A AAAA null B BBBB A C CCCC B D DDDD C E EEEE D F FFFF E Firstly I need some query where I can scan which are the top three reference id level only and show up. --- Example: When D added below C --- GLevel ID RefID No Start A (3) Level(1) B (A) (2) Level(2) C (B) (1) Level(3) D (C) Result (Down To Top): A,B and C are top three reference id for D Result (Top to Down): A have B,C and D as child based refid