Skip to content

Instantly share code, notes, and snippets.

@tamata78
Created October 6, 2020 08:26
Show Gist options
  • Save tamata78/bc0defb175f32d0e7be4096be6f6bc37 to your computer and use it in GitHub Desktop.
Save tamata78/bc0defb175f32d0e7be4096be6f6bc37 to your computer and use it in GitHub Desktop.
regular_sql_tips

重複キーを抽出する

SELECT
  SHOP_ID,count(*)
FROM
  SHOP
GROUP BY
  SHOP_ID
HAVING
  COUNT(SHOP_ID) > 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment