Getting a list of nodes of a certain type sorted by number of votes I would like to get a list of nodes of a certain sorted by votes (voting api) in one of my modules. Is there an entityFieldQuery that could do this? If not, is there a sql query I could use that might accomplish this task?
You can use views module to list nodes sorted by votes..

You can see the query executed in views when you enable Show SQL Query in views settings (admin/structure/views/settings) in the view preview...