All pastes #477324 Raw Edit

jrots

public text v1 · immutable
·published 2007-05-08 16:09 UTC
rendered paste body
select mc.type, max(mc.ratingtotal / mc.ratingnumbers) as rating,mt.name,mt.urlname, mc.id,mc.ratingtotal,mc.ratingnumbers,mc.location,mt.parenttype from codes mc 
			inner join types mt on mt.typeid=mc.type
where mt.parenttype=1
group by mc.type
order by mt.name desc