There are no materials guiding you how to generate SQL queries for UCCE. You need to be sound of SQL to execute queries. What you can do is, Go to SQL DB for UCCE. You can refer the UCCE tables and refer Cisco Guides to understand the table definitions.
*** Please rate helpful post. Please mark as answer if it solves your problem/query. regards, Ritesh Desai