Created
October 17, 2017 10:54
-
-
Save jinseokoh/e1f22bc1d1af168a43689558fb4e40e0 to your computer and use it in GitHub Desktop.
sql query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select m.delivery_id, m.order_id, m.activated, dups.cnt from delivery_vroong_order_map as m | |
inner join ( | |
select delivery_id, COUNT(*) as cnt | |
from delivery_vroong_order_map | |
group by delivery_id | |
having | |
count(*) > 1 | |
) dups on m.delivery_id = dups.delivery_id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment