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

ANDcId >> and >> the first one does not return anything, because there are no records containing cId and gId at the same time. Go ahead. >> gId: 2 or 3 or 4 or 5 or 6, and cId 10, you need to get pId 1 at the output. If there are no records containing cId and gId at the same time, then we get rubbish. - teanYCH