Postgresql query: update status of limit number of records based on group size
I have a postgresql table contains a list of email addresses. The table has three columns, Email, EmailServer (e.g., gmail.com, outlook.com, msn.com, and yahoo.com.ca etc.), and Valid (boolean). Now, I want to group those emails by EmailServer and then update…