Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. cd c1 c2 d1
  2. ----------------
  3. aa 23 681 4850
  4. aa 23 942 4850
  5. aa 28 944 4881
  6. aa 28 221 4850
  7. bb 46 443 9082
  8. cc 77 171 2831
  9. cc 77 272 2831
  10. dd 18 798 5993
  11. xx 71 166 8755
  12. xx 71 482 3818
  13. xx 71 565 7598
  14. xx 71 603 7246
  15. xx 71 649 4293
  16. xx 71 681 7321
  17. xx 71 250 7453
  18. xx 22 276 3818
  19. xx 22 107 8755
  20. yy 28 143 5802
  21. zz 33 624 3205
  22. zz 33 767 1532
  23. zz 33 372 3205
  24. zz 33 679 3838
  25.  
  26. SELECT cd, c1, c2, d1
  27. FROM test_data
  28. WHERE cd IN (SELECT cd FROM test_data group by cd having count(cd) > 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement