postgresql7.1
SELECT count(*)
FROM dual
WHERE exists (SELECT 1
FROM dotfolio_users
WHERE user_id = :user_id)
SELECT 1
FROM dotfolios
WHERE owner_id = :user_id
SELECT pretty_name, type
FROM dotfolio_user_types
WHERE type != 'guest'
ORDER BY pretty_name
SELECT pretty_name, type
FROM dotfolio_user_types
ORDER BY pretty_name