Most of customizable feature such as Content Query Web Part require columns internal name for customization same is true for building CAML query. Following will help you in getting internal name of list’s column.
1. Open share point list setting
2. Right click on column and select properties
3. In Address URL field search for value of field (e.g. ….%7D&Field=Details)
4. Value of field represent internal name of share point list’s column.