Forum OpenACS Development: Response to Outer join fun

Collapse
3: Response to Outer join fun (response to 1)
Posted by Gilbert Wong on

Try this:

from   mp3_mp3_playlist_map m
	       left join (select mp3_id,
	               playlist_id,
	               sum(vote) as total
		       from   mp3_votes
		       group by mp3_id, playlist_id) v
		       using (mp3_id, playlist_id);

I'm not sure if it's a "," or an "and" between mp3_id and playlist_id. One of them should work.