SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table emails (email varchar); INSERT INTO emails (email) VALUES ('user.xxxxxx@yahoo.com'), ('user.xxxxxx@gmail.com'), ('user.xxxxxx@hotmail.com'), ('user.xxxxxx@btinternet.com'), ('user.xxxxxx@reais.com.au'), ('user.xxxxxx@outlook.com'), ('user.xxxxxx@protonmail.com'), ('user.xxxxxx@outlook.com'), ('user.xxxxxx@live.com'), ('user.xxxxxx@bigpond.com'), ('user.xxxxxx@icloud.com'), ('user.xxxxxx@outlook.com'), ('user.xxxxxx@hotmail.com'), ('user.xxxxxx@btinternet.com'), ('user.xxxxxx@aol.com'), ('user.xxxxxx@yahoo.com'), ('user.xxxxxx@gmail.com'), ('user.xxxxxx@ymail.com'), ('user.xxxxxx@icloud.com'), ('user.xxxxxx@btopenworld.com'), ('user.xxxxxx@yahoo.com.au'), ('user.xxxxxx@hotmail.com'), ('user.xxxxxx@dealulike.co.uk'), ('user.xxxxxx@BARKO.COM.AU'), ('user.xxxxxx@hotmail.co.uk'), ('user.xxxxxx@btinternet.com'), ('user.xxxxxx@btinternet.com'), ('user.xxxxxx@aol.com'), ('user.xxxxxx@ocuneva.com.au'); select split_part(email, '@', 2) "domain", count(*) from emails group by "domain";

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear