1-- Find the active notifications from an user 2select np.notification_type 3from public.user_notification_preference as np 4where 5 np.user_id = $1 6 and np.enabled = true;