Grouping problem
hi have query below works need group output playerid have tried adding query output groups playersname not totalpoints different table
can group 2 playerid each table?
ie <cfoutput query="getplayers" group="hh.playerid, ff.playerid">
can group 2 playerid each table?
ie <cfoutput query="getplayers" group="hh.playerid, ff.playerid">
if understand correctly, should able do<cfquery name="getplayers" datasource="crick">
select ff.playerid,
hh.playername, bonusmom, bonustrs, bonustwt,
sum(ff.points) totalpoints
from playerstable hh, pointstable ff
where hh.playerid > 1 , hh.playerid = ff.playerid
group ff.playerid, hh.playername, bonusmom, bonustrs, bonustwt
order totalpoints desc
</cfquery>
ken
select ff.playerid,
hh.playername, bonusmom, bonustrs, bonustwt,
sum(ff.points) totalpoints
from playerstable hh, pointstable ff
where hh.playerid > 1 , hh.playerid = ff.playerid
group ff.playerid, hh.playername, bonusmom, bonustrs, bonustwt
order totalpoints desc
</cfquery>
ken
More discussions in Advanced Techniques
adobe
Comments
Post a Comment