SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT p.id
  2. FROM   PROFILE p
  3. WHERE  EXISTS (SELECT 1
  4.                FROM   photo ph
  5.                WHERE  ph.profile_id = p.id
  6.                HAVING Count(DISTINCT image_id) > 3)
  7.        AND NOT EXISTS (SELECT 1
  8.                        FROM   used u
  9.                        WHERE  u.service_id = 1)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top