<?xml version="1.0"?> <queryset> <fullquery name="playlist_info"> <querytext> select name, remove_threshold, coalesce(sc.songs,0) as songs, mp.playlist_id from mp3_playlist_song_count sc right join mp3_playlists mp using (playlist_id) where mp.playlist_id=:playlist_id </querytext> </fullquery> <fullquery name="mp3_info"> <querytext> select sort_key, mp.title as title, map.mp3_id as mp3_id, total, case when sign (total - :remove_threshold) = 1 then 't' else 'f' end as active_p from mp3_mp3_playlist_map_view map, mp3_mp3s_not_deleted mp where playlist_id=:playlist_id and map.mp3_id=mp.mp3_id order by sort_key </querytext> </fullquery> <fullquery name="order_maxkey_get"> <querytext> select max(sort_key) from mp3_mp3_playlist_map where playlist_id=:playlist_id </querytext> </fullquery> </queryset>