I'm trying to do something like this in sqlalchemy:

select (score/10)*10 || '-' || (score/10)*10+9 as scorerange,
count(*)from scoresgroup by score/10 order by 1

which should give:
scorerange | count
 ------------+-------
 0-9        |    11
10-19     |    14
20-29     |     3
30-39     |     2

Any ideas on how to do the string concatentation in the ranges?

-- 
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