Content List SQL

I need to create smaller content list results for our File content type. One idea I had was to create content lists based on the file extension. I would like to join the rffile table with the rxs_ct_sharedbinary table using the item_ext column and add another value to the where clause. I am currently using the following JSR sql to build the list:

SELECT rx:sys_contentid, rx:sys_folderid FROM rx:rfffile WHERE jcr:path like ‘//Sites/club_pages%’

I would like to break these results by .pdf, .doc, etc.

Nevermind, I’m dumb. If any one else needs it here it is:

select rx:sys_contentid, rx:sys_folderid, rx:item_file_attachment_ext from rx:rfffile where jcr:path like '//Sites/club_pages%' and rx:item_file_attachment_ext like '.pdf'