There is a table of the form
> Id | gId | cId | pId > 1 | 0 | 10 | 1 > 2 | 2 | 0 | 1 > 3 | 3 | 0 | 1 > 4 | 4 | 0 | 2 > 5 | 0 | 11 | 2 > 6 | 4 | 0 | 2
What kind of query can we get the pId value from it if gId and cId are given, for example, gId: 2 or 3 or 4 or 5 or 6, and cId 10, you need to get pId 1, or gId: 2 or 3 or 4 or 5 at the output 6, and cId 11, at the output you need to get pId 2