I'm trying to construct a query in sqlalchemy similiar to this:
SELECT FilmParticipation.PartType, COUNT(*) AS Amount,
 100*COUNT(*) /(SELECT count(*) FROM FilmParticipation) AS
Percentage_of_Total
 FROM FilmParticipation
 GROUP BY FilmParticipation.PartType;

I create a subquery for the nested select, but, I get a
NoSuchColmnError on the percentage part.

Any ideas how this could be constructed?

Cheers,
  Lars

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to