Hi all --
I'm trying to figure out whether a query like the following
can be done
through the DB API (for maintainability), or whether I'll
have to
execute it as custom SQL:
SELECT SUM(tourney_score.amount) AS team_total,
tourney_team.id
FROM tourney_score, tourney_team, tourney_player
WHERE tourney_score.player_id = tourney_player.id
AND tourney_player.team_id = tourney_team.id
GROUP BY tourney_team.id
This basically computes the total score for each team of
players in a
tournament. Is this too complex for the API? I couldn't
quite figure
out how to execute it.
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|