{"id":1279,"date":"2020-01-27T17:02:24","date_gmt":"2020-01-27T16:02:24","guid":{"rendered":"http:\/\/eiseler.de\/wordpress\/?p=1279"},"modified":"2020-01-27T17:02:29","modified_gmt":"2020-01-27T16:02:29","slug":"finding-duplicates-with-sql","status":"publish","type":"post","link":"http:\/\/eiseler.de\/wordpress\/?p=1279","title":{"rendered":"Finding duplicates with SQL"},"content":{"rendered":"\n<p> SELECT\u00a0name,\u00a0email,\u00a0COUNT(*)\u00a0FROM\u00a0users\u00a0GROUP\u00a0BY\u00a0name,\u00a0email\u00a0HAVING\u00a0COUNT(*)\u00a0>\u00a01 <\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-1279\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=1279&amp;share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-1279\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=1279&amp;share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span>Twitter<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-1279\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=1279&amp;share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\"><span>LinkedIn<\/span><\/a><\/li><li class=\"share-pocket\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-pocket sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=1279&amp;share=pocket\" target=\"_blank\" title=\"Click to share on Pocket\"><span>Pocket<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>SELECT\u00a0name,\u00a0email,\u00a0COUNT(*)\u00a0FROM\u00a0users\u00a0GROUP\u00a0BY\u00a0name,\u00a0email\u00a0HAVING\u00a0COUNT(*)\u00a0>\u00a01<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-1279\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=1279&amp;share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-1279\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=1279&amp;share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span>Twitter<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-1279\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=1279&amp;share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\"><span>LinkedIn<\/span><\/a><\/li><li class=\"share-pocket\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-pocket sd-button share-icon\" href=\"http:\/\/eiseler.de\/wordpress\/?p=1279&amp;share=pocket\" target=\"_blank\" title=\"Click to share on Pocket\"><span>Pocket<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[36],"tags":[],"class_list":["post-1279","post","type-post","status-publish","format-standard","hentry","category-tipps-tricks"],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8zAuQ-kD","jetpack-related-posts":[{"id":1023,"url":"http:\/\/eiseler.de\/wordpress\/?p=1023","url_meta":{"origin":1279,"position":0},"title":"Postgresql - Tipps and Tricks","date":"25\/09\/2018","format":false,"excerpt":"Using PLSQL for setting Grants: \u00a0 CREATE OR REPLACE FUNCTION set_all_sq_grants() RETURNS SETOF TEXT AS $BODY$ DECLARE r record; BEGIN FOR r IN SELECT sequence_name, sequence_schema FROM information_schema.sequences WHERE sequence_schema = 'xxx' LOOP -- can do some processing here EXECUTE ' Grant all on ' || r.sequence_schema || '.' ||\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":726,"url":"http:\/\/eiseler.de\/wordpress\/?p=726","url_meta":{"origin":1279,"position":1},"title":"C51 4 Bits Electronic Clock from banggood, instructions","date":"25\/03\/2017","format":false,"excerpt":"The \"C51 4 Bits Electronic Clock Electronic Production Suite DIY Kit\" from banggood (link: link) is a nice kit and it is pretty forward to assemble it. Just follow the printing on the board. Only thing I did wrong was the resistance cascade. Watch for it, it is important to\u2026","rel":"","context":"In &quot;Tipps &amp; Tricks&quot;","img":{"alt_text":"","src":"https:\/\/i1.wp.com\/eiseler.de\/wordpress\/wp-content\/uploads\/2017\/03\/IMG_2070-300x234.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1021,"url":"http:\/\/eiseler.de\/wordpress\/?p=1021","url_meta":{"origin":1279,"position":2},"title":"Some Unix (linux, Mac) Tricks and Tipps","date":"24\/09\/2018","format":false,"excerpt":"From Isaac Sukin Command-line tip: replace a word in all files in a directory: grep -lr --exclude-dir=\".git\" -e \"oldword\" . | xargs sed -i '' -e 's\/oldword\/newword\/g' VI: Why I love VIM cronjob: write to file: 0 8 * * * \/usr\/local\/bin\/myjob > \/var\/log\/myjob.log 2>&1","rel":"","context":"In &quot;Mac&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":954,"url":"http:\/\/eiseler.de\/wordpress\/?p=954","url_meta":{"origin":1279,"position":3},"title":"Raspberry Pi as NAS with OpenMediaVault and Wifi","date":"28\/03\/2018","format":false,"excerpt":"Be warned, the Raspberry Pi with wlan is a slow nas. But I wanted to build one and there are no full instructions for it. So here are the steps to follow. I used this instruction, but some things are missing and so I put everything down in short form:\u2026","rel":"","context":"In &quot;Gadgets&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/eiseler.de\/wordpress\/wp-content\/uploads\/2018\/04\/img_5026.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":734,"url":"http:\/\/eiseler.de\/wordpress\/?p=734","url_meta":{"origin":1279,"position":4},"title":"Wie Wechsel ich von Strato zu einem anderen Provider?","date":"20\/05\/2017","format":false,"excerpt":"Da Strato die links auf verschiedenen Seiten verteilt hat, hier zusammen: Schritt 1 K\u00fcndigen: link Schritt 2, Authcode anfordern: link","rel":"","context":"In &quot;Tipps &amp; Tricks&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":834,"url":"http:\/\/eiseler.de\/wordpress\/?p=834","url_meta":{"origin":1279,"position":5},"title":"Aluminum Bike Phone Holder - short Test","date":"19\/06\/2017","format":false,"excerpt":"I recently bought\u00a0Banggood: GUB G-86 CNC Aluminum Alloy Bicycle Bike Phone Holder Handbar.... (Or see below for Amazon). I had 3 rides since I mounted it on my cross bike, and my opinion till now is, that it is the best phone holder, which I ever had. Had a few\u2026","rel":"","context":"In &quot;Gadgets&quot;","img":{"alt_text":"","src":"https:\/\/i2.wp.com\/eiseler.de\/wordpress\/wp-content\/uploads\/2017\/06\/IMG_2633-e1497823108487-225x300.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1279"}],"version-history":[{"count":1,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1279\/revisions"}],"predecessor-version":[{"id":1281,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1279\/revisions\/1281"}],"wp:attachment":[{"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1279"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}