Advertisement
johncarlson21

Untitled

Oct 11th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.27 KB | None | 0 0
  1. SELECT route_id
  2. FROM insert_route
  3. WHERE
  4. INSERT_ID IN ( 21 )
  5. AND route_id
  6. IN ( 48, 49, 44, 50, 55, 43, 51, 25, 24, 52, 47, 31, 53 )
  7. AND route_id NOT
  8. IN (
  9.  
  10. SELECT route_id
  11. FROM insert_route
  12. WHERE INSERT_ID =12
  13. )
  14. GROUP BY route_id
  15. HAVING count( DISTINCT
  16. INSERT_ID ) =1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement