Not sure about SQL, but if you have recent version of CCX you can use the API and access skill info per agent with the following GET, and then parse the XML with some programming i.e Python, etc.
when I run this command, I'm getting error "Unable to start ManagerManagerImpl. Command failed". Are you familiar with this?
Here's the simple version of the query:
admin:run uccx sql db_cra select s.skillname from skill s
Unable to start ManagerManagerImpl
You're hitting a bug where a file (MMIStart.txt) on CCX is either missing or has the wrong permissions. You'll have to open a TAC case to fix that.
Not sure if it's the same bug, but here's the file in question if you wanted to reference a bug ID when contacting TAC: CSCuq99787.
Not sure what version of CCX you're running, but I've seen that same error message on CCX 10.5, 10.6, & 11.0.