I work with a water well data with a related table of lithologies. So a given well can have 1 or many related lithologies. The WELLID is a unique for a given well. 70000000017 has 4 lithologies where 70000000018 has 2. Each lithology can be either glacial drift (AQTYPE=D) or bedrock (AQTYPE=R). Some wells never tagged bedrock so they have all AQTYPE=D. Others have generally the upper part as AQTYPE=D and the lower part as AQTYPE=R. I am trying to write an ArcGIS Pro Definition Query that will just select the records if all the lithologies for a given well are AQTYPE=D. So when done it would select 70000000017, 70000000018, and 70000000019 because all AQTYPE=D. But it would not select 70000000020 or 70000000021 because they both have some AQTYPE=R. Thanks
| WELLID | SEQ_NUM | PRIM_LITH | DEPTH | THICKNESS | AQTYPE |
| 70000000017 | 1.00000 | Clay | 42.00000 | 42.00000 | D |
| 70000000017 | 2.00000 | Sand | 60.00000 | 18.00000 | D |
| 70000000017 | 3.00000 | Sand & Clay | 94.00000 | 34.00000 | D |
| 70000000017 | 4.00000 | Sand | 125.00000 | 31.00000 | D |
| 70000000018 | 1.00000 | Clay | 50.00000 | 50.00000 | D |
| 70000000018 | 2.00000 | Sand | 118.00000 | 68.00000 | D |
| 70000000019 | 1.00000 | Sand | 30.00000 | 30.00000 | D |
| 70000000019 | 2.00000 | Clay | 50.00000 | 20.00000 | D |
| 70000000019 | 3.00000 | Gravel | 63.00000 | 13.00000 | D |
| 70000000020 | 1.00000 | Clay | 60.00000 | 60.00000 | D |
| 70000000020 | 2.00000 | Clay & Gravel | 90.00000 | 30.00000 | D |
| 70000000020 | 3.00000 | Clay & Stones | 105.00000 | 15.00000 | D |
| 70000000020 | 4.00000 | Sandstone | 130.00000 | 25.00000 | R |
| 70000000021 | 1.00000 | Sand & Gravel | 20.00000 | 20.00000 | D |
| 70000000021 | 2.00000 | Sand & Clay | 50.00000 | 30.00000 | D |
| 70000000021 | 3.00000 | Clay & Stones | 72.00000 | 22.00000 | D |
| 70000000021 | 4.00000 | Limestone | 92.00000 | 20.00000 | R |
| 70000000021 | 5.00000 | Sandstone | 122.00000 | 30.00000 | R |