Skip to content

Instantly share code, notes, and snippets.

@monaxmp
Last active June 18, 2018 15:50
Show Gist options
  • Select an option

  • Save monaxmp/fb6bbc9739ad62ae3fbd267686eb84f7 to your computer and use it in GitHub Desktop.

Select an option

Save monaxmp/fb6bbc9739ad62ae3fbd267686eb84f7 to your computer and use it in GitHub Desktop.

Revisions

  1. monaxmp revised this gist Jun 18, 2018. No changes.
  2. monaxmp created this gist Jun 4, 2018.
    5 changes: 5 additions & 0 deletions postgres find dublicat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@

    select user_id, profession_id, count(*)
    from professions
    group by user_id, profession_id
    HAVING count(*) > 1;